Update - De-support of Rule-based SQL Optimization in Oracle10g
September 10, 2003
Oracle Tips by Burleson Consulting
Oracle has announced in MOSC note 189702.1 the breaking news that the
rule-based optimizer will be de-supported in Oracle10g: ?Oracle Oracle10g
will support only one optimizer, and all applications running on that
release should use that optimizer?.
This announcement has caused a mad-rush as shops struggle to migrate to the
CBO, many spending millions of dollars implementing optimizer plan stability
(stored outlines) to preserve their existing SQL execution plans.
However, this panic may be unwarranted. For those of us old enough to
remember the migration to Oracle8, we heard the same story back in 1994! In
Oracle document 11727505.61 (dated August 1996), Oracle announced that the
RBO will be going away with the release of Oracle8, and just like today,
they encouraged customers to quickly migrate to cost-based SQL optimization.
Is it just me, or do these notes sound similar?
In 1996 note:
?a decision to discontinue the RBO has been postponed until customers have
time to migrate to both Oracle8 and the cost-based optimizer (CBO).?
In 2003 note:
?This RBO desupport message is being
distributed to both partners and customers. Partners are being encouraged to
certify their products on Oracle's CBO as soon as possible.?
So then, what does ?RBO de-support? really mean? In this 1996 note, we get
a great clue. Oracle states that RBO ?support? is really just support to
correct wrong answers and RBO aborts:
?Development has agreed to make RBO modifications in two cases: (1) wrong
answers returned at execution time and (2) query aborts during the
In reality, the RBO was frozen back in 1994, and even though it is
?primitive?, for many SQL queries it produces far faster execution plan than
the more sophisticated CBO. To demonstrate this, one has to look no further
than Oracle Applications. Oracle Applications recently migrated to the CBO
with release 11i, yet if you look inside the v$sql view of a running
instance, many of the SQL queries contain the RULE hint, turning-off the CBO
for critical queries.
If we carefully read the 2003 note, Oracle confirms that the RBO will not
disappear in Oracle10g: "The RBO will still exist in Oracle10g, but will be
an unsupported feature and will be removed in a future release." Sounds
just like the 1996 note to me!
While it is clear that the RULE hint will continue to exist in Oracle10g,
Oracle may discontinue the system-wide optimizer modes of RULE and CHOOSE.
In sum, it appears that the RBO will be with us for some time to come, and
only those shops that are not allowed to run un-supported components (e.g.
Pharmaceutical industries) should panic.
Many related topics are covered in my upcoming new book Oracle Tuning: The Definitive Reference
by Rampant TechPress.