Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Any ideas on speeding up this query
Message
De
23/01/2008 09:32:45
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01284133
Message ID:
01284440
Vues:
22
Just 2 days ago I had to "optimize" a locate taking 12 - 20 ms (running a few million times...).
Kicking off deleted() from the rushmore working (had to be done in code, as I have no say in table schemas) resulted in a bit of ugly code more than 20 to 50 times faster (depending on table sizes). Large table (4*10**7), selectivity of one key very high, 1 to max 15 records with most in the 1 - 3 range, low percentage of deleted records. Binary Index I tested for personal kicks on a segregated install showed *very* good results (10 to 20 times speedup) but was clearly slower than no index use for deleted(). And that was NOT across the wire, but from fast local disk!

>In all years working with FoxPro I haven't seen a single case when adding index on DELETED() slowed down a query but I've seen planty of cases when such index speed up queries significantly.
>
>>An index tag on deleted() is normally a bad idea, UNLESS he uses VFP9. This will depend on the situation, but in most cases this index will actually slow down a select. Whether it will slow down or speed up the selects depends on many factors, the most important factor is how many records are deleted in relation to how many records are not deleted.
>>
>>>Add an index on DELETED() on all tables involved in the query. Make it a binary index if you are using VFP9.
>>>
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform