Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Which is faster: Seek() or eof() in this case
Message
De
29/04/2004 03:25:35
 
 
À
28/04/2004 16:54:31
Mike Yearwood
Toronto, Ontario, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00898584
Message ID:
00899227
Vues:
15
Hi Mike,

LOOKUP() is in deed not Rushmore optimizable, but if you include all four parameters, that really does not matter. Rushmore is the name for VFP's algorithm to try to select the best use of the existing indexes, but if you specify which index to use, you take over this job yourself. Since also SEEK and SEEK() requires that you have specified an index, Rushmore is per definition inactive when you use these functions/commands. At least that is how I interpret the docs.

>The function is not dying. It is just not popular. I always believed it is because the docs state that it is not Rushmore Optimizable. Seek isn't really Rushmore Optimizable either, but the docs don't say that.
>
>>
>>
>>I love the LOOKUP function, but forgot to mention it! Not many use it.
>>LOOKUP is probably the fastest way to seek a record and return a value.
>>Too bad first parameter is not an expression!!!!
>>
>>

>>
>>This is the best VFP function.
>>The best of the best is this:
>>the REPLACE can do the operation without the index,
>>remove the index parameter and if the a index exist VFP optimize it with a true SEEK
>>(not like a partial seek done into the FOR clause),
>>otherwise it do a scan with 2X faster respext to a FOR .
>>
>>Sin that this command is dying.
>>
>>I have put a wish for a
>>LOOKUP(expr,...)
>>and for
>>LOOKUPRECNO(expr,nRecNo,'Alias') ( use a table like a rows array )
>>
>>Fabio
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform