Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Select Optimisation changes under VFP8?
Message
From
03/06/2003 12:06:58
 
 
To
03/06/2003 11:54:21
Cindy Winegarden
Duke University Medical Center
Durham, North Carolina, United States
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00795674
Message ID:
00795742
Views:
26
>Hi Dominic,
>
>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.
Charles

"The code knows no master." - Chuck Mautz
"Everybody is ignorant, only on different subjects." - Will Rogers
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform