Note
This view is available starting with V3.2.1.
Purpose
This view displays the modification history of table statistics for all tables in the current tenant.
Columns
| Column | Type | Nullable | Description |
|---|---|---|---|
| OWNER | VARCHAR2(128) | NO | The owner of the table. |
| TABLE_NAME | VARCHAR2(128) | NO | The name of the table. |
| PARTITION_NAME | VARCHAR2(128) | YES | The name of the partition. |
| SUBPARTITION_NAME | VARCHAR2(128) | YES | The name of the subpartition. |
| STATS_UPDATE_TIME | TIMESTAMP(6) WITH TIME ZONE | YES | The time when the statistics were updated. |
Sample query
Query the modification history of table statistics for the T_SUBPART table in the current tenant.
obclient [SYS]> SELECT * FROM SYS.DBA_TAB_STATS_HISTORY WHERE TABLE_NAME='T_SUBPART';
The query result is as follows:
+-------+------------+----------------+-------------------+-------------------------------------+
| OWNER | TABLE_NAME | PARTITION_NAME | SUBPARTITION_NAME | STATS_UPDATE_TIME |
+-------+------------+----------------+-------------------+-------------------------------------+
| SYS | T_SUBPART | NULL | NULL | 21-MAR-25 04.21.31.136013 PM +08:00 |
| SYS | T_SUBPART | P1 | NULL | 21-MAR-25 04.21.31.136013 PM +08:00 |
| SYS | T_SUBPART | P2 | NULL | 21-MAR-25 04.21.31.136013 PM +08:00 |
| SYS | T_SUBPART | P3 | NULL | 21-MAR-25 04.21.31.136013 PM +08:00 |
| SYS | T_SUBPART | P1 | P1SP0 | 21-MAR-25 04.21.31.136013 PM +08:00 |
| SYS | T_SUBPART | P1 | P1SP1 | 21-MAR-25 04.21.31.136013 PM +08:00 |
| SYS | T_SUBPART | P1 | P1SP2 | 21-MAR-25 04.21.31.136013 PM +08:00 |
| SYS | T_SUBPART | P1 | P1SP3 | 21-MAR-25 04.21.31.136013 PM +08:00 |
| SYS | T_SUBPART | P2 | P2SP0 | 21-MAR-25 04.21.31.136013 PM +08:00 |
| SYS | T_SUBPART | P2 | P2SP1 | 21-MAR-25 04.21.31.136013 PM +08:00 |
| SYS | T_SUBPART | P2 | P2SP2 | 21-MAR-25 04.21.31.136013 PM +08:00 |
| SYS | T_SUBPART | P2 | P2SP3 | 21-MAR-25 04.21.31.136013 PM +08:00 |
| SYS | T_SUBPART | P3 | P3SP0 | 21-MAR-25 04.21.31.136013 PM +08:00 |
| SYS | T_SUBPART | P3 | P3SP1 | 21-MAR-25 04.21.31.136013 PM +08:00 |
| SYS | T_SUBPART | P3 | P3SP2 | 21-MAR-25 04.21.31.136013 PM +08:00 |
| SYS | T_SUBPART | P3 | P3SP3 | 21-MAR-25 04.21.31.136013 PM +08:00 |
+-------+------------+----------------+-------------------+-------------------------------------+
16 rows in set
References
Query the modification history of table statistics for all tables accessible to the current user: ALL_TAB_STATS_HISTORY
Query the modification history of table statistics for all tables owned by the current user: USER_TAB_STATS_HISTORY
