Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL joins
Message
From
08/03/1999 17:51:11
 
 
To
08/03/1999 16:18:12
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00195078
Message ID:
00195378
Views:
20
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...?
Previous
Reply
Map
View

Click here to load this message in the networking platform