Q
Problem solve Get help with specific problems with your technologies, process and projects.

Using rule-based optimization to optimize a query

A SearchOracle.com member asks, "Can I have a detailed explanation of how and when the 15 rules of Rule Based Optimization are used when optimizing a query?"

Can I have a detailed explanation of how and when the 15 rules of Rule Based Optimization are used when optimizing a query? I'm planning to make my own simple rule based query optimizer, any suggestions? Thanks.
The following document shows the rules used and a description of each rule:

http://download-uk.oracle.com/docs/cd/B10501_01/server.920/a96533/rbo.htm

What may not be obvious is that the RBO looks at rule #1. If that rule can be used, it uses that rule to execute the query and does not look any further. If Rule #1 fails, rule #2 is checked…and so on. The last rule is only used if all rules above it fail.

It shouldn't take too long to figure out why the RBO can sometimes make bad decisions. For instance, an index on the gender column (assuming even distribution) would take longer to satisfy the query than a full table scan. Yet such an index would always be used according to RBO. This is why the cost-based optimization (CBO) is preferred for today's Oracle implementations.

Dig Deeper on Oracle database administration

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchDataManagement

SearchBusinessAnalytics

SearchSAP

SearchSQLServer

TheServerSide.com

SearchDataCenter

SearchContentManagement

SearchHRSoftware

Close