The ALTER_STATS_HISTORY_RETENTION procedure is used to modify the retention period of historical statistics. The default retention period is 31 days.
Applicability
This topic applies only to OceanBase Database Enterprise Edition. OceanBase Database Community Edition does not support this feature.
Syntax
DBMS_STATS.ALTER_STATS_HISTORY_RETENTION (
retention IN NUMBER);
Parameters
The retention parameter specifies the retention period of the statistics history, in days.
Exceptions
The error code OBE-20000 indicates insufficient privileges.
Examples
Modify the retention period of the historical statistics to 15 days.
obclient> CALL DBMS_STATS.ALTER_STATS_HISTORY_RETENTION(15);
Query OK, 0 rows affected
