oracle 10g:ADDM 和 SQL Tuning Advisor
1- Restructure SQL finding (see plan 1 in explain plans section)----------------------------------------------------------------
The optimizer could not unnest the subquery at line>
plan.
Recommendation
--------------
Consider replacing "NOT IN" with "NOT EXISTS" or ensure that columns used
on both sides of the "NOT IN" operator are declared "NOT NULL" by adding
either "NOT NULL" constraints or "IS NOT NULL" predicates.
Rationale
---------
A "FILTER" operation can be very expensive because it evaluates the
subquery for each row in the parent query.The subquery, when unnested can
drastically improve the execution time because the "FILTER" operation is
converted into a join.Be aware that "NOT IN" and "NOT EXISTS" might
produce different results for "NULL" values.
页:
[1]