Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Is it reasonable to have index on DELETED()?
Message
 
À
22/03/1999 14:36:06
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:
00200624
Vues:
10
Hi Walter,

>You can always use:
>- USE Table
>- SET FILTER TO Expr

I'm talking about SQL-SELECTs here. Rushmore doesn't work with xBase commands across many tables, SQL does. The sample I gave you would not be optimizable in xBase, only with a SELECT statement.

>This depends on the number of deleted records in both tables. If there are none, VFP has to read the records anyway. If there are substancial amounts of records, i agree, the performance can be tuned up with an index on deleted()

It does NOT! VFP does NOT read A SINGLE record from table B when you have an index on DELETED(), but it has to read ALL records when you don't have one. Please note, that in the result set there's no field from table B, thus, there's no need for VFP to read the record. All it does is to read the index of table B.

>I'll hope you will discover by reading all the thread which i did participate in regarding this subject, i'm actually right.

I read the entire thread, that's why I jump in. *s* Yes, you are right... in those cases that you showed in testcases, but not in all others. That it's faster to have no index on DELETED() when you have a single table SELECT with the NOFILTER option, doesn't say that you should always avoid an index. It really depends on the application and the kind of queries you run. That's my point, nothing more.

Christof
--
Christof
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform