cross join

Database
Enthusiast

cross join

hi,

i want to join two tables with no columns common in them but a filter. 

SELECT COL1 FROM A JOIN B ON B.COL2 ='H2'

I am left joining this table(having 10 milliion records ) to multiple other tables . Can anybody suggest any optimisation tips on how can this be done (any index, stats ) that can help

1 REPLY
Teradata Employee

Re: cross join

You should take statistics on both tables to allow Teradata to choose the smallest one to duplicate on all AMPs. On B table take statistics on COL2.