I know that in SQL Server, the optimizer is always cost-based instead of
rule-based. But I had a question on the driving table:
when I have a query like
select * from a,b,c where a.col1 = b.col1 and b.col2 = c.col2
what is the driving table ?? I believe it's the first table i.e. a. If that
is the case, then isn't it rule based by default ??
In Oracle, the driving table is the last table in the list, so in the above
mentioned query, c is the driving table (rule based). For cost based, based
on the statistics it will select the driving table.
Thanks,
Rahul