Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Help Improving Select Speed
Message
 
To
08/12/2000 21:22:43
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00450195
Message ID:
00451103
Views:
30
The short answer is that % on the left side of a string is not optimizable. Think about it, the index is (logically) sorted alphabetically, that means all of the "A"s come first and you know where to find them quickly. How do you use the index to find everything with an "A" in the second position? They're not sorted that way, so the "A" in the second position will be scattered throughout the index.

If you're looking for "AB" you can go to the "A"s, then find the "B"s within the "A"s. As long as the thing you're searching for is on the left side and the % is on the right, the index can be used to optimize the serach.

The substr(x,2) tag puts everything in order starting with the second character so you can find all of the "A"s in the second position using the index.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform