>Try the SELECT with SET DELETED OFF - we've also done some INTENSE testing (on enormous tables) and came to a similar conclusion - SEEK is faster. THEN we found that SET DELETED OFF increases the select speed. If you have a deleted flag in the table and put HAVING lDeleted=.F. this will do the same but faster!
I always run my apps with SET DELETED OFF but, just to make sure, I added that line to the TMSEEK.PRG program and reran it. No significant differences.
>Your rule of thumb is incorrect in our case. Locate is 10 times slower than seek. Select is 100 times slower than seek. Select with set deleted off is 100 times faster than seek!?!
At first I was testing with a table in which about half of the key values did not exist. LOCATE was often much slower in this situation.
Could you post some of your test times?
Peter
Peter Robinson ** Rodes Design ** Virginia