Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Locate & Seek
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00227120
Message ID:
00227495
Vues:
19
>I use locate for field = val on tables with 100,000 to over 1 million records all the time and I can't see any difference between seek/locate when optimized. The nice thing about locate is the index is implied, you do have to set/reset the order. Locate work best when NO ORDER is set.

I've just tested on a large table, and you're right, it seems as fast as SEEK now. There's a note in Hacker's that it used to be slow, so that's what I'm referring to, I guess. Also, looking over some old code that others did here that's slow, I see that often the field was placed on the right side of the '=', and that won't optimize, clearly (back then it didn't matter, though).

But LOCATE does seem plenty fast now, anyway...I still prefer the SEEK() or INDEXSEEK() (in vfp6), since you have more flexibility with the extra parameters, however...no SELECT, no ORDER.
The Anonymous Bureaucrat,
and frankly, quite content not to be
a member of either major US political party.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform