>0.61 ms -- SEEK command
>0.69 ms -- SEEK() function
>0.65 ms -- SEEK() function with SET ORDER TO primary index
>2.3 ms -- LOCATE command with Rushmore
>6.4 ms -- SQL SELECT
>LOCATE is 3 times slower than SEEK.
>SELECT is 10 times slower than SEEK.
Interesting -- So I was correct after all recently about LOCATE being slower than SEEK, and I've noticed it since, also. I retract my retraction. < s > It seems to have some extra overhead that SEEK does not have. I've also seen vfp apparently confused on an optimized LOCATE on a large table (only the first LOCATE on a particular index), where it takes a few seconds to do anything at all occasionally, whereas I've never seen this with any SEEK...
The SQL one might expect to be slower, considering all the work involved - turning indexes/filters on & off grabbing the new record, returning to the original record - but that can be advantageous, too...and of course, if you want more than one record, added fields, sorts, groupings, cursors, etc., it is incomparable :)
The Anonymous Bureaucrat,
and frankly, quite content not to be
a member of either major US political party.