Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sql not always rushmore'd
Message
From
15/04/2006 17:29:18
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01113886
Message ID:
01113898
Views:
21
>Hi Michael.
>
>Why should the field always be on the LHS.? Both queries produce exactly the same results.

Well elapsed time is not a "result".
While both queries work and give the same result, the rules for Rushmore must be respected to get the best elapsed time possible.



>
>Regards,
>Gerard
>
>
>
>>>Discovered the folowing recently:
>>>
>>>
>>>Select * from MyDb where MyField = 'Anydata'
>>>
>>>
>>> This is rushmore optimized (as long as theres an index on MyField
>>>
>>>
>>>Select * from MyDb where 'Anydata' = Myfield
>>>
>>>
>>> Produces exactly the same results but takes an age and Rushmore does not kick in (again with an Index on Myfield
>>>
>>>
>>>I'mu sure there's some explanation for this but thought I'd share it .
>>
>>The field should always be at the left side for the optimization to kick in.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform