Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SEEK or LOCATE?
Message
 
À
12/08/1999 13:23:10
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00253099
Message ID:
00253105
Vues:
25
>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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform