Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why is this SQL faster?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00930072
Message ID:
00930225
Views:
14
>Hi Fabio,
>
>>if yes, try
>
>
>INNER JOIN appdata!Ssmoney ;
>ON    m.cIsGrouped AND Ssperson.familyid=Ssmoney.familyid
>  OR !m.cIsGrouped AND Ssperson.personid=Ssmoney.personid
>
>The above one takes 50 seconds.
>
>INNER JOIN appdata!Ssmoney ;
>ON IIF(m.cIsGrouped,Ssperson.familyid,Ssperson.personid) =
>   IIF(m.cIsGrouped,Ssmoney.familyid,Ssmoney.personid)
>
>This one is instantanious (less than a second). Just very interesting how this can be such a difference.
>
Mel,

One reason these are faster is that you code required both sides of the equal sign to be evaluated.
George

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

Click here to load this message in the networking platform