The GET_STATS_HISTORY_AVAILABILITY function returns the earliest time of the available historical statistics. You cannot restore historical statistics earlier than this time.
Applicability
This topic applies only to OceanBase Database Enterprise Edition. OceanBase Database Community Edition does not support this feature.
Syntax
DBMS_STATS.GET_STATS_HISTORY_AVAILABILITY
RETURN TIMESTAMP WITH TIMEZONE;
Examples
Query the earliest time of the available historical statistics.
obclient> SELECT DBMS_STATS.GET_STATS_HISTORY_AVAILABILITY() FROM DUAL;
+---------------------------------------------+
| DBMS_STATS.GET_STATS_HISTORY_AVAILABILITY() |
+---------------------------------------------+
| 2022-12-06 22:00:01.007146 |
+---------------------------------------------+
1 row in set
