In order to maximize the performance of any version of VFP i have found the SYS functions .. SYS(3050,1) and SYS(3050,2) invaluable ; these functions return the size of buffer memory size. SYS(3050,1) returns foreground buffer size and SYS(3050,2) returns background buffer size. The best info i have read on how to interpret and manipulate these values was in the February '97 issue of Foxtalk magazine.
"Set Turbo On: How Visual Foxpro Memory Usage Affects Performance"
You can examine the beginning of the article at Pinnacle Publishings website.
Getting a handle on the principles does take some experimental time.
http://www.newslettersonline.com/pinpub/Unfortunately,I think Pinnacle wants $5 for you to be able to download the entire article. Even if it does not solve your particular issue using SYS(3050) can tune the performance of queries. Especially the first query that you make.
Does anyone have any other ... more "official" documentation about these SYS functions ?
Hope this helps ,
Dave.