Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Is it reasonable to have index on DELETED()?
Message
De
22/03/1999 10:55:33
Walter Meester
HoogkarspelPays-Bas
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00196021
Message ID:
00200477
Vues:
12
>then call the Time To Run Query = t, and
>let's say x% of the records are deleted.

>With indexing on deleted, performance will improve by:

>Time To Run Query = .01 * (100-x) * t

Simular rules also should apply to normal indexed fields for example:
If a table contains a sex field where the value could be "M" or "F" this field can be compared with the deleted() mark of a record.

IOW the optimizer makes no distiction between the deleted mark or a regular field. Therefor following queries should be the same:

SET DELETE ON
SELECT * FROM Table INTO CURSOR x NOFILTER

AND

SET DELETE OFF
SELECT * FROM Table WHERE DELETED() INTO CURSOR x NOFILTER

It takes not much imagination to see that this would be a simular query to:

SELECT * FROM Table WHERE Sex="M" INTO CURSOR x NOFILTER

where a index exists on Sex


Regards,

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

Click here to load this message in the networking platform