Call for Oracle support & training (800) 766-1884
Free Oracle Tips

Corporate Oracle Training
Custom Oracle Training
Oracle New Features Training
Advanced Oracle DBA Classes
Oracle Tuning Courses
Oracle Tips & Tricks
Oracle Training Links
Oracle Training Links
Oracle Training Links

We are top for USA Oracle Training Clients


Free Oracle Tips


Free Oracle App Server Tips


Oracle support

Oracle training

Oracle tuning


Remote Oracle

Custom Oracle Training

Donald K. Burleson

Oracle Tips

When the Cost-based SQL Optimizer makes mistakes

As I noted, the CBO will sometimes make a false choice in favor of a full-table scan, especially in Oracle7 and Oracle8. This problem occurs when the following conditions are true:

High-water mark too high When a significant number of deletes have taken place within a table, the high-water mark may be far higher than the actual number of populated blocks. Hence, the CBO will often wrongly invoke a full-table scan, relying on the high-water mark.

  1. Wrong optimizer_mode - If the optimizer_mode is set to ALL_ROWS or CHOOSE, the SQL optimizer may favor full-table scans. If you want fast OLTP optimization, be sure to set your optimizer_mode to FIRST_ROWS.

  2. Poor statistics - If tables have grown significantly and the tables have not been reanalyzed to repopulate statistics, then you may get false full-table scans because the CBO thinks the tables are still small.

  3. Skewed indexes - If a candidate index in a query has skewed values, then the CBO might wrongly choose a full-table scan. For example, consider a query that asks for rows where region=southern. You have an index on the region column, but only one percent of the entries are for the southern region. In the absence of column histograms, the CBO does not know that southern region has high selectivity, and so it chooses a full-table scan.

If you like Oracle tuning, you might enjoy my latest book “Oracle Tuning: The DefinitiveReference” by Rampant TechPress. (I don’t think it is right to charge a fortune for books!) and you can buy it right now at this link:




Oracle performance tuning book



Oracle performance tuning software

Oracle performance tuning software
Oracle performance Tuning 10g reference poster
Oracle training in Linux commands
Oracle training Excel
email BC:

Copyright © 1996 -  2014 by Burleson Inc. All rights reserved.

Oracle® is the registered trademark of Oracle Corporation.