Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Help Optimizing a query
Message
De
14/08/2001 19:50:41
 
 
À
14/08/2001 18:58:29
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:
00542086
Message ID:
00543818
Vues:
21
>>I agree that the setting of DELETED can make a huge difference. BUT... in this case you said you had a single TAG and it was *NOT* on DELETED().
>>Yet you got a 3 second improvement running with DELETED OFF vs ON.
>>It is that that I find puzzling. I don't see why there should have been any difference at all!
>
>Jim,
>
>If SET DELETED ON, VFP will add, to any condition the programmer specifies, the implicit condition "... AND NOT DELETED()".
>
>I assume that in this case, since there is no index on DELETED(), VFP first gets the 20,000 index keys, and then gets the records themselves (this applies in both cases, DELETED ON or OFF), and then, if SET DELETED ON, VFP has to go through the entire group of records once more, to see if any records don't satisfy the condition.
>
>Warning, for anyone reading this message: The situation would be even worse if the index on DELETED() DID exist. In this case, VFP has to get index keys for most of the records, as part of the "Optimization" process.
>
>Hilmar.

That's logical alright, Hilmar, but by then the records themselves should all be in cache and the time to check the deleted flag should be measured in milliseconds in total (assuming a PC in the 500mhz range or better).
The time difference Dan reported still seems to be a real stretch to me.

JimN
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform