Defining Index on a table having multiple Joining columns!!

Database
Enthusiast

Defining Index on a table having multiple Joining columns!!

Hi Experts,

I have a situation where I have to join the same table twice but with a different joining column. If I will declare one column as Primary index and one column as secondary index, will that be a wise implementation in performance point of view? Or is there any other way to do this. Please suggest.

Thanks,

Eitu

1 REPLY
Enthusiast

Re: Defining Index on a table having multiple Joining columns!!

Hi,

Chosing the Join columns of one of the joins as the Primary Index makes definitely sense. Regarding the secondary index: It really depends if the index can be used. This is influenced by selectivity, join type (nested join possible?), etc.

I don't think there is a general advise which can be given. More details would be required.

BR

Roland

Roland Wenzlofsky