Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sql not always rushmore'd
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01113886
Message ID:
01113898
Vues:
22
>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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform