Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What's faster - SELECT SQL or LOCATE?
Message
De
24/06/2000 22:36:19
 
 
À
24/06/2000 12:13:34
Mike Yearwood
Toronto, Ontario, Canada
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:
00384357
Vues:
37
Hi Mike,

SEEK was intentionally omitted in the second test. The question was between SELECT and LOCATE. Of course, it will always be fastest.

>
>You last test excluded seek. Locate and SQL are both intended to work with sets of records (continue depends on locate). That's why both commands use Rushmore optimization. Seek uses a binary search algorithm. Its going to be fastest. I doubt it will require the entire tag's data to be pulled across the wire. Even if the record is physically "far", seek will identify the record first and move there. Locate/SQL will examine the entire tag, then identify the first record and move there.
>
>The addition of a filter to the table in question prior to the seek will muddy the situation considerably.
>
>HTH
>Mike
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform