>If i'm only going to search for 1-2 records which of the following two methods is best (fastest)?
>
>LOCATE FOR idnr = 'something'
>or
>SET ORDER TO idnr
>seek 'something'
>
>I've almost always used the first method simply becouse it saves one row of code... but I'm now in finetuning stage of my application and want to know which method is the fastest and how many records I must search to take great speed advantages of that method.
The SEEK() function is most efficient, in general, I believe...
=SEEK(keyfield value,'table','tag')
or
IF SEEK(keyfield value,'table','tag')
etc...
You have no SET ORDER problems, and no SELECT alias problems. Speedwise, they're all fairly similar...
The Anonymous Bureaucrat,
and frankly, quite content not to be
a member of either major US political party.