Hi Ayush,
In that case the join will cost more as you are joining two non-index columns. TD will be redistributing the data for both of the tables on the joining columns to make sure that the data is on the same amp while joining.
As long as tableb has the UPI on the join column, it won't be redistributed! Is it possible that you can create the SI on the tablea.col1 only? The subtable rows will be on the same amp as tableb and will help the optimizer...
JI is one of the things that could help your query run faster. But not sure whether you will be allowed to create a JI on tablea or not!
↧