Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Select Optimisation changes under VFP8?
Message
De
03/06/2003 12:09:48
Cindy Winegarden
Duke University Medical Center
Durham, Caroline du Nord, États-Unis
 
 
À
03/06/2003 12:06:58
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00795674
Message ID:
00795745
Vues:
22
>>The following code behaves exactly the same way under VFP 6-8. It evaluates the function for every record.
>>CREATE CURSOR Test (Field1 N(10))
>>FOR lnCount = 1 TO 20
>>	INSERT INTO Test VALUES (lnCount)
>>ENDFOR
>>
>>SELECT * FROM Test ;
>>	WHERE Field1 >= 10 AND IsEven(Field1)
>>
>>FUNCTION IsEven(tnNumber)
>>	? "Number is: " + TRANSFORM(tnNumber)
>>	RETURN (MOD(tnNumber, 2) = 0)
>>ENDFUNC
>
>PMFJI, Unless there is an index on field1. Which seems to still evaulate the number 1 twice, for somereason? But either way it still the same in VFP 6 and VFP 8 in my test also.

You're right! That's very weird.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform