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!

Automatic Stats Gathering

785360Mar 7 2011 — edited Mar 8 2011
Hi Xperts

I'd like to ask why sometimes people use schema or table level stats gathering in addition to automatic stats gathering feature.
For example, I usually see the following blocks in shell scripts scheduled via cron scheduler (at say 7 PM every Friday):

BEGIN
dbms_stats.gather_schema_stats (
ownname => 'SCHEMANAME',
estimate_percent => dbms_stats.auto_sample_size,
granularity=>'ALL',
options => 'GATHER',
cascade=>true);
END;
/

and the gather stats job is scheduled as well.

I agree that for some tables (high load, volatile), stats should be left blank and locked for dynamic sampling (lvl 2) and so on, but is it (example ablove) something done to specifically touch the schema/table stats at a particular time? Isn't it something redundant and can be done away with? I can't think of much reasons behind this logic.. any thoughts?

L0 DBA Jr.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 5 2011
Added on Mar 7 2011
4 comments
369 views