Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Understanding Indexes
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01416559
Message ID:
01416612
Vues:
55
>Hi Naomi,
>
>>You may try to add a filter on NOT DELETED() for the index.
>
>However, then the index won't be used for Rushmore optimization.
>
>>Chose BINARY for the type of such index.
>
>BINARY and the FOR clause are mutually exclusive.

Here is some information in Help

[FOR lExpression]
Specifies a filter expression that selects only those records that match the filter expression for display and access.

Tip
If lExpression can be optimized, Rushmore technology optimizes the FOR clause in the INDEX command. For best performance, use an expression that can be optimized in the FOR clause. For more information, see SET OPTIMIZE Command and Using Rushmore Query Optimization to Speed Data Access.

-------------------------
Indexing Effectively for Rushmore Query Optimization
Rushmore cannot take advantage of all indexes. If you use a FOR clause in the INDEX command, Rushmore cannot use the index for optimization. For example, because it contains a FOR clause, this statement cannot be optimized, INDEX ON ORDNUM FOR DISCOUNT > 10 TAG ORDDISC.

Similarly, Rushmore cannot use an index created with a NOT condition. For example, the this expression can be optimized, INDEX ON DELETED() TAG DEL, But this one cannot, INDEX ON NOT DELETED() TAG NOTDEL.

In the special case that you want to exclude delete records from a query, using an index, as in the first example earlier, will speed up operations when you've set SET DELETED to ON.

However, I don't see much explanation here about binary index and FOR condition.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform