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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only