Purging Stats History Tables
JimboApr 24 2012 — edited Jun 27 2012Hi,
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