Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Rushmore and composite index tag
Message
From
22/03/2008 12:40:44
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01304565
Message ID:
01304575
Views:
21
>On the other hand, it is a little doubtul that you will do a query precisely on the expression you specified - unless you use the exact expression explicitly.

It means that according to help, for Rushmore optimization to work, the expression on the left of a comparison must EXACTLY match an index key.

If you select records for the criterion:
TBL_ID_FLD + BINTOC(TBL_INT_FLD)) = SomeVariable_Or_Expression
then the index will be used. But if your SELECT expression is
TBL_ID_FLD = var1 and BINTOC(TBL_INT_FLD) = var2
in this case Rushmore optimization will NOT use this specific index. Rather, it will search for separate indices on the expressions:
1. TBL_ID_FLD, and
2. BINTOC(TBL_INT_FLD)
and use them if they exist.

By the way, the SELECT on the combined index should be faster, since the index discriminates better, i.e., you have only a single record for each index key.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform