Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Rushmore SQL Optimization
Message
De
05/03/2003 08:45:40
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00761335
Message ID:
00761423
Vues:
31
>>>That cracked it. It in fact did make the query faster, there were more deleted records in the table than I realised.
>>
>>Be careful. It is my experience that an index on deleted() can make local queries (not over a network), and with few records, faster; but the same query over a network, and with many more records, might actually get slower. Before deciding to keep the index on deleted(), you should test under real-life circumstances, for instance, over a network and with the number of records you expect to have in the near future.
>
>Really? I haven't encountered this -- under what circumstances is this the case?

The circumstances where it appears I already explained: many records, and network seem to be the worst-case scenario.

The basic problem is that an available index is always used (if it matches part of the filter expression), whether it makes the query faster, or slower. And some indices simply make the query slower, because sometimes it costs more time to get lots of information from the index, than the time saved by not reading a few more records into memory.

Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform