Primary Index - Selection of columns

Database
Fan

Primary Index - Selection of columns

Hi,

In my BTEQ script I have 1 table (T1) which is being used in 2 joins. First it's being joined with table T2. The coloumns participating in this join are C1,C2,C3. After that T1 is being joined with another table T3 and the columns participating in this joins are C1,C2,C4 and C5.

My query is while defining the table T1 should I use only common join columns (i.e. C1,C2) as primary index or I should include  all the join columns (i.e. C1,C2,C3,C4,C5)?

My concern is if I define all the columns (i.e. C1,C2,C3,C4,C5) as part of PI. Then optimizer might ignore the PI while doing the joins as partial index is being used in the join.

Tags (1)