Note
This view is available starting with V4.0.0.
Purpose
This view displays the cumulative modification information of tables in the current tenant.
Columns
| Column | Type | Nullable | Description |
|---|---|---|---|
| TABLE_OWNER | varchar(128) | NO | The database to which the modified table belongs. |
| TABLE_NAME | varchar(128) | NO | The name of the modified table. |
| PARTITION_NAME | varchar(128) | NO | The name of the modified partition. |
| SUBPARTITION_NAME | varchar(128) | NO | The name of the modified subpartition. |
| INSERTS | bigint(20) | NO | The approximate number of insertions. |
| UPDATES | bigint(20) | NO | The approximate number of updates. |
| DELETES | bigint(20) | NO | The approximate number of deletions. |
| TIMESTAMP | date | NO | The time when the table was last modified. |
| TRUNCATED | varchar(3) | NO | This column has no practical meaning. The default value is NULL. |
| DROP_SEGMENTS | bigint(0) | NO | This column has no practical meaning. The default value is NULL. |
Sample query
Query the cumulative modification information of the t_subpart table.
obclient [oceanbase]> SELECT * FROM oceanbase.DBA_TAB_MODIFICATIONS WHERE TABLE_NAME='t_subpart';
The query result is as follows:
+-------------+---------------+----------------+-------------------+---------+---------+---------+------------+-----------+---------------+
| TABLE_OWNER | TABLE_NAME | PARTITION_NAME | SUBPARTITION_NAME | INSERTS | UPDATES | DELETES | TIMESTAMP | TRUNCATED | DROP_SEGMENTS |
+-------------+---------------+----------------+-------------------+---------+---------+---------+------------+-----------+---------------+
| test | t_subpart | NULL | p2023sp0 | 0 | 0 | 0 | 2025-03-21 | NULL | NULL |
| test | t_subpart | NULL | p2023sp1 | 0 | 0 | 0 | 2025-03-21 | NULL | NULL |
| test | t_subpart | NULL | p2023sp2 | 0 | 0 | 0 | 2025-03-21 | NULL | NULL |
| test | t_subpart | NULL | p2023sp3 | 0 | 0 | 0 | 2025-03-21 | NULL | NULL |
| test | t_subpart | NULL | p2024sp0 | 0 | 0 | 0 | 2025-03-21 | NULL | NULL |
| test | t_subpart | NULL | p2024sp1 | 0 | 0 | 0 | 2025-03-21 | NULL | NULL |
| test | t_subpart | NULL | p2024sp2 | 0 | 0 | 0 | 2025-03-21 | NULL | NULL |
| test | t_subpart | NULL | p2024sp3 | 0 | 0 | 0 | 2025-03-21 | NULL | NULL |
| test | t_subpart | NULL | p_maxsp1 | 1 | 0 | 0 | NULL | NULL | NULL |
+-------------+---------------+----------------+-------------------+---------+---------+---------+------------+-----------+---------------+
9 rows in set
