Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SEEK or SELECT - SQL
Message
De
11/07/2000 08:25:15
Walter Meester
HoogkarspelPays-Bas
 
 
À
11/07/2000 06:38:15
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00390648
Message ID:
00390672
Vues:
12
Kevin,

>SELECT *;
>FROM Table;
>WHERE Field = MainTable.PKField;
>INTO ARRAY aTemp

>IF _TALLY > 0
> RETURN .F.
>ELSE
> RETURN .T.
>ENDIF

>The field used in the select will be an indexed field - so is optimized.

>If I use the SEEK - I would just
>
>IF SEEK(cValue)
> RETURN .T.
>ELSE
> RETURN .F.
>ENDIF


The seek is definitely faster, no doubt about this. In stead of the IF construction, you could just use:

RETURN SEEK(cValue)

The reason seek is faster, is that YOU tell VFP which index to use and in what way. With SQL - SELECT VFP has to process a lot of code how to retrieve the record, Rushmore is an important part of this. When using rushmore, VFP has to investigate which indexes to use.

Walter,
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform