Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Optimizable expressions
Message
De
11/07/2001 12:49:33
Walter Meester
HoogkarspelPays-Bas
 
 
À
11/07/2001 11:14:44
Nancy Folsom
Pixel Dust Industries
Washington, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00528859
Message ID:
00529240
Vues:
17
>Walter-
>
>>Ehhh, I'm afraid I can't follow that. Why should I need an INDEX on deleted() if I filter my PKs on DELETED() ?
>
>Er, actually the PK index filter is on !deleted() right?

ehh, yes.

>And the deleted() tag is useful when you have SET DELETED ON. Sometimes. *sigh*

You're right. In the following circumstance it might help (of course when SET DELETE = ON):

- If you want to fully optimize the COUNT() command.

- If you have significant amounts of deleted() records in the table, it might speed up queries returning large portions of the table, however queries that return only smal portions of the table and can be optimized enough by a more discriminating (selective) key (like a PK) may suffer from the deleted() tag.

- You want to use the feature that VFP creates filters if a SQL-select command is fully optimizable. However, this feature seems not to have much applications. Not seldom are people bitten by this feature as they are not able to index a cursor returned from the SQL - SELECT command.

Since these applications are fairly rare, I think the general rule should be, DON'T use an index tag on DELETED(), unless you've got very, very good reason to and accept the performance penalties that come with the use of it.

Sidenote: If you use the DELETED() tag to search for deleted records to recycle them, you might be better of to use an INDEX ON .t. FOR DELETED() TAG delrec and a SEEK(.t.,"yourtable","DelRec")

Walter,
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform