The PURGE_STATS statement is used to delete historical statistics older than a specified point in time.
Syntax
DBMS_STATS.PURGE_STATS(
before_timestamp TIMESTAMP WITH TIME ZONE);
Parameters
The before_timestamp parameter specifies that statistics saved before this timestamp will be cleared. If it is NULL, an automatic clearance strategy is used.
Exceptions
Error Code |
Description |
|---|---|
| HY000 |
|
Examples
Manually clean up historical statistics from a specified point in time.
obclient [testUser01]> CALL DBMS_STATS.PURGE_STATS ('2021-09-26 19:02:12.675729');
Query OK, 0 rows affected