When 2 tables are joined, with a relation 1:100 like:
Table A: Col1, Col2, Col3
Executing a statement like:
Select Col1,Col2,Col4,Col5 from A key join B where Col3=x
When thinking of performance which one is better, selecting Col1 and Col2 from table A or from table B or is it equal?
asked 16 May '14, 08:02
I always prefer to choose cols from central table (in your case it's table A). But it's not because of performance, but because of factor that any sql in future can be modified. In the case of key join may be there are no difference, but if in future you must switch from key join for example to outer joins, so it's be much easy to made modifications to sql query. And I am always prefer to use table aliases.