When tuning queries, one the first basic strategies is to minimize the use of joins. Additionally outer joins incur more cost than inner joins as they require extra work to retrieve unmatched rows.
TIP : If only inner joins are used , the ON and WHERE Clause behave the same. Consider the following queries:
you can see that the execution plans generated for both queries are the same:
If the queries would have been written with outer join, they would have different query plans.
No comments:
Post a Comment