Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL joins
Message
De
08/03/1999 17:51:11
 
 
À
08/03/1999 16:18:12
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00195078
Message ID:
00195378
Vues:
21
If the environment is the same between the two queries my guess is that the first one is joining table_C with the result of the first join (which is a smaller set than all of table_A). Similar differences in execution time occur with complex subselects where breaking the subquery out as it's own query will reduce execution time by orders of magnitude.

>Thanks Chaim, I'll see if I can find the articles at the FoxPro Advisor site.
>One of the queries I have is illustrated by this example:
>
>FROM table_A JOIN table_B ON table_A.x = table_B.x ;
> JOIN table_C ON table_A.x = table_C.x ;
>Is table_C being joined on table_A or on the result set of the first join?
>
>Also, the above syntax seems to process much faster than the following equivalent which was produced by the Query designer :
>FROM table_A JOIN table_B JOIN table_C ;
> ON table_A.x = table_B.x ;
> ON table_A.x = table_C.x ;
>
>Is there a trap in the first method that I haven't fallen into yet...?
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform