I'm now using a rather cryptic DB (SAP) running on SQL server 2012, only SELECT permission, so some things are difficult to debug/optimize.
I have a big table 'table1', and smaller tables 'table2', 'table3'. The big table with millions of rows will be filtered to 100 rows at most in the "where" statement
I have to start from table1. Would you recommend:
select fields
from table1
left join table2
left join table3
where table1.field1 = 'x'
and table1.field2 = 'y'
Or
Select
fields
from
(select fields
from table1
where table1.field1 = 'x' and table1.field2 = 'y') as t1
left join
table2
left join
table3
And, why? I want to understand this a little better.
Thank you!