Information générale
Catégorie:
Codage, syntaxe et commandes
>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
1. Make sure you have an index on each item in the where clause, the same as you specify it in the where clause.
2. If you have SET DELETED ON... create an index on deleted()
3. SET ORDER TO
4. Don't use filters, use a select...
select fields from file1,file2 where region = 'NORTH' and etc...
So.. with the above you should have an index on upper(region)
Also, there is a sys command to see if your select is fully optimized...
Also, depending on what you are doing, sometimes it is faster to SEEK to the first record you want, then do a scan on the rest of the file to do what you nee... like...
seek 'NORTH'
scan rest while region = 'NORTH'
do whatever
endscan
BOb
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement