All Forums Analytics
Zbirda 1 post Joined 02/10
04 Mar 2010
Order of joined tables

Hi ALL,

I have a simple question. Is it important the order of joind tables? What's better?:

select ...

from large_Table lt

inner join medium_table mt
on...

inner join small_table st
on...

or?:

select ...

from small_Table st

inner join medium_table mt
on...

inner join large_table lt
on...

thanks for advice.

Jim Chapman 449 posts Joined 09/04
05 Mar 2010

The order shouldn't matter. Inner joins are commutative, and the Teradata query optimizer will attempt to apply the operations in the order that results in the least cost.

ahmadbakri 1 post Joined 08/10
11 Aug 2010

Sure , i agree Mr. Jim .

You must sign in to leave a comment.