Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Help - SQL Select is taking forever
Message
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00239317
Message ID:
00239463
Views:
14
Simon,

You can use SYS(3054,1) to have VFP report on the optimization level after the report completes. You'll have to put the line in your app, and it prints the result to the active screen.

I find it best with SQL selects to index on the fields individually, and add indexes for items left of the FOR that are not fields (ie RTRIM(LNAME) etc)
Also, if your program uses SET DELETED ON, make sure you have an index on
DELETED(), or VFP must still examine the table for deleted records)


>Hi. I hope someone can shed some light on a strangeness.
>
>As part of my client's day-end proceedure there is an sql select which select data from two large and one small (~70,000, 2,900,000 and 1 record(s)). Up until a few days ago this ran fine, but three days ago it started to take a VERY long time (after 8 hours it was 13% done) I've tried PACKing the tables but that didn't make any difference.
>I will be very grateful for any suggestions as to what could be causing this, and what I can do about it. I am using FPW 2.6
Previous
Reply
Map
View

Click here to load this message in the networking platform