Oracle Training Oracle Support Development Oracle Apps

 E-mail Us
 Oracle Articles
New Oracle Articles

 Oracle Training
 Oracle Tips

 Oracle Forum
 Class Catalog

 Remote DBA
 Oracle Tuning
 Emergency 911
 RAC Support
 Apps Support
 Oracle Support

 SQL Tuning

 Oracle UNIX
 Oracle Linux
 Remote s
 Remote plans
 Application Server

 Oracle Forms
 Oracle Portal
 App Upgrades
 SQL Server
 Oracle Concepts
 Software Support

 Remote S


 Consulting Staff
 Consulting Prices
 Help Wanted!


 Oracle Posters
 Oracle Books

 Oracle Scripts

Don Burleson Blog 







Linda Webb

Got breaking Oracle news?    Burleson Consulting Oracle News

Click here for more Oracle News Headlines


Karl Reitschuster researches CBO cardinality


This outstanding blog has some really good insights into the behavior of Oracle cost-based SQL optimizer regarding how Oracle estimates cardinality.  Cardinality estimates are used when the optimizer makes important decisions such as how to access a table, which index to use, and what order to join tables together:


Reitschuster first notes that when dealing with flat files (SQL*Loader, Oracle import, external tables), Oracle seems to use a cardinality=1:


The strange thing is the estimated Cardinality of the FULL Table Scan. The optimizer believed that only one Compare between the MainCustomer Column and the SubCustomer Column would meet the Predicate. . .


CBO estimates its costs in for a relational database (You may never forget that). It believes that all important relational rules are kept. Specially the rule of normalization. The Relationship designed in the import table is flat and not expressible via a foreign key constraint.


Reitschuster also explores the impact of CBO cardinality estimation of the choices of join methods (nested loop vs. hash join) and demonstrates the use of the CARDINALITY hint to force a hash join:


The way Oracle joins depends very strongly (sic) on the expected Cardinality of the joined table.


Low Cardinality -> Nested Loops


 . . .


High Cardinality -> HASH JOIN


In the following example the true expected cardinality (sic) of the operation was set via the CARDINALITY Hint. This hint makes only sense if you now that the Cardinality is often the same which is sometimes given for external application data or for static data.


Karl concludes:


If you look at explain try to concentrate on the cardinality. It has a very big impact on the design of the whole execution plan. Miss estimations can lead to SQLs with dramatically increased response times.


Oracle Training at Sea
oracle dba poster

Follow us on Twitter 
Oracle performance tuning software 
Oracle Linux poster


Burleson is the American Team

Note: This Oracle documentation was created as a support and Oracle training reference for use by our DBA performance tuning consulting professionals.  Feel free to ask questions on our Oracle forum.

Verify experience! Anyone considering using the services of an Oracle support expert should independently investigate their credentials and experience, and not rely on advertisements and self-proclaimed expertise. All legitimate Oracle experts publish their Oracle qualifications.

Errata?  Oracle technology is changing and we strive to update our BC Oracle support information.  If you find an error or have a suggestion for improving our content, we would appreciate your feedback.  Just  e-mail:  

and include the URL for the page.


Burleson Consulting

The Oracle of Database Support

Oracle Performance Tuning

Remote DBA Services


Copyright © 1996 -  2017

All rights reserved by Burleson

Oracle ® is the registered trademark of Oracle Corporation.

Remote Emergency Support provided by Conversational