RBO’s Rules

I had to optimize a query in an old database, version 9 and is in rules (requerid by application). Below show you how rules work and order that is weighted, although you can always use some hint to optimize our way. In Oracle 9.2 hay 15 rules for generate the execution plan, from the best case, access Single Row by Rowid, to worst case, FTS.

 
Is recommended since version 8 does not use rules instead have to use the optimizer based in costs (CBO), but it’s funny because Oracle to own, in some internal sentences using the hint / * + rule * /, to resolve statements, especially when query on views, get it more faster than CBO.

 

  1. Single Row by Rowid.
  2. Single Row by Cluster Join.
  3. Single Row by Hash Cluster Key with Unique or Primary Key.
  4. Single Row by Unique or Primary Key.
  5. Clustered Join.
  6. Hash Cluster Key.
  7. Indexed Cluster Key.
  8. Composite Index.
  9. Single-Column Indexes.
  10. Bounded Range Search on Indexed Columns.
  11. Unbounded Range Search on Indexed Columns.
  12. Sort Merge Join.
  13. MAX or MIN of Indexed Column.
  14. ORDER BY on Indexed Column.
  15. Full Table Scan.

 

HTH – Antonio NAVARRO

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s