Rule-Based Optimizer

The rule-based optimizer (RBO) was the original optimizer delivered with Oracle. It was very simplistic in its approach, but that was actually its biggest strength. You were always able to predict how it would handle a particular situation. If you did not like the access plan it developed, you could change how the query was written.

The rule-based optimizer has been augmented with the separate cost-based optimizer (CBO), and Oracle has announced that as new features are added to the product, only the cost-based optimizer will be enhanced to support them. For example, the rule-based optimizer is unable to use a bitmap index.

Since Oracle considers the rule-based optimizer obsolete, we wondered if it would still be appropriate to include information about the rule-based optimizer in this chapter. As we talked to people in the Oracle community, however, we found that the rule-based optimizer is still very much alive and kicking. Many experienced DBAs feel that there is too much overhead required to maintain the statistics used by the cost-based optimizer. And, in our own experience, when all else fails, you can often get the best performance from a query by using the RULE hint and letting the old rule-based optimizer do its work.

Get Oracle Database Administration: The Essential Refe now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.