Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Very Slow SQL , Why?
Message
 
À
30/07/1998 22:39:06
Rick Clarke
Fotobae Pty. Ltd.
Adelaide, Australie
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00122940
Message ID:
00122950
Vues:
13
>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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform