Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

dbms_stats.gather_database_stats_job_proc

469753Dec 9 2005 — edited Feb 8 2010
I like the fact that dbms_stats.gather_database_stats_job_proc will prioritze the gathering of optimizer stats, but I have a small number of tables (2) that get loaded, processed and truncated. The nature of this activity makes them always included in the gathering of new stats, but when this job runs, the tables are empty. This makes the optimizer assume these 2 tables are small and does dumb things with execution plans during processing of the data.

I can manually gather stats when these tables have thousands of rows, so the optimizer can choose well during the processing of data. But, how do I lock in these "good" stats so the gather_database_stats_job_proc doesn't clobber them.

I really don't want to turn off the automatic collection of stats and "roll my own"- I don't want to have to reinvent the wheel for the sake of these 2 tables.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 8 2010
Added on Dec 9 2005
5 comments
5,605 views