General information
Category:
Coding, syntax & commands
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only