Which side of the connection should I choose if both sides have the same information?

In the example here:

Left Join Table1 on Table2.Number = Table1.Number

      

If table 1 has 1,000,000 instances of "1" and table 2 has only 1 instance of "1", would it have any performance impact if I did:

Select Table1.Number from Table2 Left Join Table1 on Table2.Number = Table1.Number

      

Vs

Select Table2.Number from Table2 left join Table1 on Table2.Number = Table1.Number

      

Or will they both come out at the same speed?

+3


source to share


1 answer


Both of these values ​​must already be in memory as they are needed to evaluate the condition join

. It doesn't matter which one you have in the selected list.



+1


source







All Articles