The ALTER_STATS_HISTORY_RETENTION procedure is used to modify the retention interval for historical statistics. The default retention interval is 31 days.
Syntax
DBMS_STATS.ALTER_STATS_HISTORY_RETENTION (
retention IN NUMBER);
Parameters
The retention parameter specifies the retention period for historical statistics (in days).
Exceptions
Error code HY000 indicates insufficient privileges.
Examples
The retention interval for modification history statistics is 15 days.
obclient> CALL DBMS_STATS.ALTER_STATS_HISTORY_RETENTION(15);
Query OK, 0 rows affected