Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is there any difference?
Message
 
To
02/09/1997 17:14:50
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00048114
Message ID:
00048119
Views:
31
>Is there any optimization difference in the following:
>
>SELECT FIELD FROM TABLE WHERE FIELDDATE=DATE() INTO CURSOR TEMP
>
>OR
>
>ldDate=DATE()
>SELECT FIELD FROM TABLE WHERE FIELDDATE=ldDate INTO CURSOR TEMP

Michel,

I'm not sure about differences in optimization, but the latter query should execute faster. The reason being that the date function will have to be called and it will have to return its value for every record in the table. In the latter case, it simply a straight comparison.

George
George

Ubi caritas et amor, deus ibi est
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform