Hi Vlad,
As you also said if it can not use an index tag than it is not Rushmore optimizable.
Rushmore is a method that takes your expression and checks it against your existing tags,
if one is found it uses this tag, right ?
Now if you have many tags, checking for a match has an overhead before actual search.
If you use alrady optimized (by yourself of course) expressions you know the tag,
than why you should use Rushmore, set order by yourself, it is faster, just add another line of code.
A neat example ;
You have 100000 records containing addresses, you have, say 100 tags. You wan't to get all persons
with Lastname = "Jones". Unfortunately you have a tag on Lastname + Firstname but not just on Lastname.
How would you set the expression ? Of course as Lastname+Firstname = "Jones", right ?
This would be the case with or without Rushmore.
Without Rushmore
set order to tag lfname && tag with key lastname+firstname
=seek("Jones")
scan while Lastname = "Jones"
* do nothing or whatever you want
endscan
With Rushmore
scan for Lastname + Firstname = "Jones"
* do nothing or whatever you want
endscan
With Rushmore you need fewer lines, but those 2 extra lines execute absolutely faster if your tag is not
one the first few tags. Fewer the records you benefit more for those extra lines.
The first example *without Rushmore* executes faster (sometimes more than 400%).
Rushmore technique could only be better if you could preassume the queries and set your index tags creation
order for a special purpose, keep your tags a few etc.
The more the tags Rushmore method is slower. Worst if the tag you will be using created last.
So in reality who is optimizing way it works, Rushmore or the way you write your code ?
Cetin