Call now: 252-767-6166  
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 







dbms_stats.set_table_prefs tips

Oracle Database Tips by Donald BurlesonAugust 12, 2015

Starting in 11g, there are three new arguments to the set_table_prefs procedure, designed to allow the DBA more control over the freshness of their statistics:

stale_percent - overrides the one-size-fits-all value of 10%

incremental - Incremental statistics gathering for partition

publish - Allows the DBA to test new statistics before publishing them to the data dictionary

This is an important 11g new feature because the DBA can now control the quality of optimizer statistics at the table level, thereby improving the behavior of the SQL optimizer to always choose the "best" execution plan for any query.


Oracle also has a feature ("PUBLISH, false") feature in dbms_stats.set table_prefs that allows you to collect CBO statistics and use them for testing without "publishing" them into the production environment.  For example, you can change the PUBLISH setting for the customers table in the SH schema, execute the statement:

exec dbms_stats.set_table_prefs('SH', 'CUSTOMERS', 'PUBLISH', 'false');

When Oracle automatically enables statistics collection, the default "staleness" threshold of 10% can now be changed with the dbms_stats.set_table_prefs procedure:

exec dbms_stats.set_table_prefs('HR', EMPS', 'STALE_PERCENT', '15)

You can also expand upon this functionality at greater levels of breadth using these news procedures:

  • dbms_stats.set_schema_prefs - This is like running set_table_prefs, but for all objects in the schema

  • dbms_stats.set_database_prefs - This runs the set_table_prefs for all of the schemas in the current database.

  • dbms_stats.set_global_prefs - This runs set_table_prefs for all databases in the environment.



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 -  2020

All rights reserved by Burleson

Oracle ® is the registered trademark of Oracle Corporation.