Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Why is this SQL faster?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00930072
Message ID:
00930225
Vues:
15
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform