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!

Purging Stats History Tables

JimboApr 24 2012 — edited Jun 27 2012
Hi,

I am trying to purge down the following Stats History tables per note 1055547.1

SYS.WRI$_OPTSTAT_HISTHEAD_HISTORY
SYS.WRI$_OPTSTAT_HISTGRM_HISTORY

This note and many others suggest using
exec dbms_stats.purge_stats(sysdate-<days>);

and making the <days> such that you are getting bite size chunks for the purge so not to create problems with my Undo tablespace.

My problem is that I have 500 days worth of stats history to get rid of !

Any suggestions how to achieve this in a more efficient manner than running the above purge_stats command lots of times ?

thanks,
Jim
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 25 2012
Added on Apr 24 2012
2 comments
723 views