Note
This view is available starting with V3.2.1.
Purpose
This view displays the table statistics modification history of all tables owned by the current user.
Columns
| Column | Type | Nullable | Description |
|---|---|---|---|
| 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 statistics were updated. |
Sample query
Query the table statistics modification history of the T_SUBPART table owned by the current user.
obclient [SYS]> SELECT * FROM SYS.USER_TAB_STATS_HISTORY WHERE TABLE_NAME='T_SUBPART';
The query result is as follows:
+------------+----------------+-------------------+-------------------------------------+
| TABLE_NAME | PARTITION_NAME | SUBPARTITION_NAME | STATS_UPDATE_TIME |
+------------+----------------+-------------------+-------------------------------------+
| T_SUBPART | NULL | NULL | 21-MAR-25 04.21.31.136013 PM +08:00 |
| T_SUBPART | P1 | NULL | 21-MAR-25 04.21.31.136013 PM +08:00 |
| T_SUBPART | P2 | NULL | 21-MAR-25 04.21.31.136013 PM +08:00 |
| T_SUBPART | P3 | NULL | 21-MAR-25 04.21.31.136013 PM +08:00 |
| T_SUBPART | P1 | P1SP0 | 21-MAR-25 04.21.31.136013 PM +08:00 |
| T_SUBPART | P1 | P1SP1 | 21-MAR-25 04.21.31.136013 PM +08:00 |
| T_SUBPART | P1 | P1SP2 | 21-MAR-25 04.21.31.136013 PM +08:00 |
| T_SUBPART | P1 | P1SP3 | 21-MAR-25 04.21.31.136013 PM +08:00 |
| T_SUBPART | P2 | P2SP0 | 21-MAR-25 04.21.31.136013 PM +08:00 |
| T_SUBPART | P2 | P2SP1 | 21-MAR-25 04.21.31.136013 PM +08:00 |
| T_SUBPART | P2 | P2SP2 | 21-MAR-25 04.21.31.136013 PM +08:00 |
| T_SUBPART | P2 | P2SP3 | 21-MAR-25 04.21.31.136013 PM +08:00 |
| T_SUBPART | P3 | P3SP0 | 21-MAR-25 04.21.31.136013 PM +08:00 |
| T_SUBPART | P3 | P3SP1 | 21-MAR-25 04.21.31.136013 PM +08:00 |
| T_SUBPART | P3 | P3SP2 | 21-MAR-25 04.21.31.136013 PM +08:00 |
| T_SUBPART | P3 | P3SP3 | 21-MAR-25 04.21.31.136013 PM +08:00 |
+------------+----------------+-------------------+-------------------------------------+
16 rows in set
References
Query the table statistics modification history of all tables accessible to the current user: ALL_TAB_STATS_HISTORY
Query the table statistics modification history of all tables in the current tenant: DBA_TAB_STATS_HISTORY
