Order of joined tables

Analytics
N/A

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.

Tags (3)
2 REPLIES
Enthusiast

Re: Order of joined tables

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.

Re: Order of joined tables

Sure , i agree Mr. Jim .