Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to have cursors never be sent to disk?
Message
From
20/01/2014 17:16:38
 
 
To
20/01/2014 12:07:32
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01592171
Message ID:
01592196
Views:
68
My understanding is specifying READWRITE with a cursor will force presence on disk, at least to give it a something.tmp file name that can be accessed by subsequent commands. But that single file creation call (might even be 0 bytes) could be all the file system I/O that occurs for a small 20MB cursor if you've got plenty of RAM; it may be that processing cursor(s) that size never exceeds VFP's internal buffers.

If you're using COM interop (e.g. to Excel) be aware that the exact way you use it can make a huge difference in processing time. Calvin Hsia had some blog posts about that long ago, I just did a search and found http://blogs.msdn.com/b/calvin_hsia/archive/2008/05/28/8556870.aspx . There is also some information in VFP Help, if you search for "com" and take the first hit, "Visual FoxPro and Advanced COM" (which I think might have originally been a CH blog post) ( http://msdn.microsoft.com/en-us/library/ms917477.aspx )

>Hi Craig and Martina,
>
>Just ran a test with and without RamDisk for tmpfiles and sortwork and was disappointed.
>
>I am trying to optimize ExcelListener where there is a ~20MB cursor on which I run many SELECTS. Guess I have defined enough indices so that Rushmore is able to do its job well.
>
>Thanks for the answer.
>
>Alex
>
>
>
>>- Ramdisk for Windows...
>>- move TMP folder to RamDisk volume
>>
>>MartinaJ
>>
>>>I've noticed files get created in temporary directory when VFP executes a SELECT INTO CURSOR xx.
>>>
>>>Is there a way to keep cursors 100% in memory and never go to disk, even READWRITE cursors? Sort of like the Ramdisk in DOS days.
>>>
>>>TIA,
>>>
>>>Alex
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Previous
Reply
Map
View

Click here to load this message in the networking platform