I have two tables, In each table i am using 2 columns in join condition.Collecting combination of columns is best or not?

General
Enthusiast

I have two tables, In each table i am using 2 columns in join condition.Collecting combination of columns is best or not?

Hi Everyone,

I have two tables tableA and TableB.In TableA contains 3 columns(composite PI) and TableB contains  2 columns(composite PI).

But i am using 2 columns in join condition from both tables.I have query that collecting stats on combination of columns is best or

collecting stats on single column in each time is best?or we have to collect stats combination of columns and single column on each time is best?

could anyone Please clarify my doubt.Please explain clearly.

Thanks in advance.

Regards,

Purushotham.