>Hi, Nadya.
>
>>I think, that indexseek/seek/KeyMatch is usually faster than Select-SQL.
>
>I guess this is perception issue because when you do seek/scan you are using indexes implicitly, what means optimizing by hand. Nevertheless, in most situations, properly optimized SQL sentences tend to be faster because everything is resolved in one single shot, instead of requiring several lines of code (which means control flow=more stack usage, memory allocation=more heap usage, etc). Of course, the SQL engine is doing some of this behind the scenes, but is is in general much faster, as it should be mostly native code what's running, instead of VFP code.
>
>See you,
Hi Martin,
I meant for the single operation, not for SCAN/ENDSCAN. E.g. if you look into _ri_handler by Steve Saywer/Doug Henning, they use Select-SQL in order to check, if the key exists. I changed it to indexseek. With scan/endscan + indexseek vs. Select-SQL, I would prefer Select-SQL.
If it's not broken, fix it until it is.
My Blog