Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Very Slow SQL , Why?
Message
 
To
30/07/1998 22:39:06
Rick Clarke
Fotobae Pty. Ltd.
Adelaide, Australia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00122940
Message ID:
00122950
Views:
14
>Why is it so slow, I chose Fox because everyone raves of its database speed. I must be way of here! Can you help me to select from this table based on 2 conditions. first is to narrow the 120,000 rec's down to blocks of approx. 40,000 by one filter condition e.g Region = "NORTH" then perform a where filter condition to further narrow this selection. TIA
>RICK
>P.S Sorry I was so wordy .

Rick,

Probably because Rushmore is not optimizing the query. Do you have an index on Region? Do you have an index on DELETED()? If not make them. Then try this;

SELECT * FROM TableName WHERE Region = "NORTH" INTO CURSOR Result

I woudln't bother with the multilevel stuff, just write the WHERE clause that gets exactly the record you need. Doing in two or mroe queries isn't going to be any faster.

As for your first question SELECT does pay any attention to set filters or set keys. It shouldn't, as it is designed to get you all the records that meet your conditions.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform