Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SEEK or SELECT - SQL
Message
From
11/07/2000 08:25:15
Walter Meester
HoogkarspelNetherlands
 
 
To
11/07/2000 06:38:15
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00390648
Message ID:
00390672
Views:
13
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,
Previous
Reply
Map
View

Click here to load this message in the networking platform