Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What's faster - SELECT SQL or LOCATE?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00383232
Message ID:
00383265
Vues:
24
This is a loaded question. *s* If you have an index on the field for which you're doing the LOCATE, then SEEK is the fastest of all. For finding only one record, LOCATE would be faster than SQL, because LOCATE will stop as soon as it finds a record that meets your condition. SQL is intended to retrieve a set of records, and will therefore look at the entire table. Also, without an index LOCATE isn't optimizable, but then neither is the SQL.

>I expect the table to grow pretty large - over 1 million records. In general...what is faster - a LOCATE or SELECT SQL statement for locating a single record?
>
>Thanks,
>Doug
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform