Note
This view is introduced since OceanBase Database V4.0.0.
Purpose
This view displays the DML information of user tables in all OBServer nodes for each tenant.
Columns
| Column | Type | Nullable? | Description |
|---|---|---|---|
| SVR_IP | varchar(46) | NO | The IP address of the server. |
| SVR_PORT | bigint(20) | NO | The port number of the server. |
| INST_ID | bigint(20) | NO | The tenant ID. |
| OBJN | bigint(20) | NO | The object ID. |
| INS | bigint(20) | NO | The approximate number of insert operations since the statistics were last collected. |
| UPD | bigint(20) | NO | The approximate number of update operations since the statistics were last collected. |
| DEL | bigint(20) | NO | The approximate number of delete operations since the statistics were last collected. |
| DROPSEG | bigint(0) | NO | This field is currently not supported and its default value is NULL. |
| CURROWS | bigint(0) | NO | This field is currently not supported and its default value is NULL. |
| PAROBJN | bigint(20) | NO | This field is currently not supported and its default value is NULL. |
| LASTUSED | bigint(0) | NO | This field is currently not supported and its default value is NULL. |
| FLAGS | bigint(0) | NO | This field is currently not supported and its default value is NULL. |
| CON_ID | bigint(0) | NO | This field is currently not supported and its default value is NULL. |
Sample query
View the DML information of user tables for the tenant with tenant ID 1004 on all OBServer nodes.
obclient [oceanbase]> SELECT * FROM oceanbase.GV$DML_STATS WHERE INST_ID=1004;
The query result is as follows:
+----------------+----------+---------+--------+------+------+------+---------+---------+---------+----------+-------+--------+
| SVR_IP | SVR_PORT | INST_ID | OBJN | INS | UPD | DEL | DROPSEG | CURROWS | PAROBJN | LASTUSED | FLAGS | CON_ID |
+----------------+----------+---------+--------+------+------+------+---------+---------+---------+----------+-------+--------+
| 11.xxx.xxx.xxx | 28825 | 1004 | 1 | 0 | 46 | 0 | NULL | NULL | 1 | NULL | NULL | NULL |
| 11.xxx.xxx.xxx | 28825 | 1004 | 331 | 7 | 0 | 8 | NULL | NULL | 331 | NULL | NULL | NULL |
| 11.xxx.xxx.xxx | 28825 | 1004 | 377 | 0 | 116 | 0 | NULL | NULL | 377 | NULL | NULL | NULL |
| 11.xxx.xxx.xxx | 28825 | 1004 | 519 | 59 | 0 | 0 | NULL | NULL | 519 | NULL | NULL | NULL |
| 11.xxx.xxx.xxx | 28825 | 1004 | 101105 | 59 | 0 | 0 | NULL | NULL | 101105 | NULL | NULL | NULL |
| 11.xxx.xxx.xxx | 28825 | 1004 | 101106 | 59 | 0 | 0 | NULL | NULL | 101106 | NULL | NULL | NULL |
| 11.xxx.xxx.xxx | 28825 | 1004 | 500019 | 58 | 0 | 0 | NULL | NULL | 200014 | NULL | NULL | NULL |
| 11.xxx.xxx.xxx | 28825 | 1004 | 1 | 0 | 46 | 0 | NULL | NULL | 1 | NULL | NULL | NULL |
| 11.xxx.xxx.xxx | 28825 | 1004 | 331 | 7 | 0 | 8 | NULL | NULL | 331 | NULL | NULL | NULL |
| 11.xxx.xxx.xxx | 28825 | 1004 | 377 | 0 | 116 | 0 | NULL | NULL | 377 | NULL | NULL | NULL |
| 11.xxx.xxx.xxx | 28825 | 1004 | 519 | 59 | 0 | 0 | NULL | NULL | 519 | NULL | NULL | NULL |
| 11.xxx.xxx.xxx | 28825 | 1004 | 101105 | 59 | 0 | 0 | NULL | NULL | 101105 | NULL | NULL | NULL |
| 11.xxx.xxx.xxx | 28825 | 1004 | 101106 | 59 | 0 | 0 | NULL | NULL | 101106 | NULL | NULL | NULL |
| 11.xxx.xxx.xxx | 28825 | 1004 | 500019 | 58 | 0 | 0 | NULL | NULL | 200014 | NULL | NULL | NULL |
| 11.xxx.xxx.xxx | 28825 | 1004 | 1 | 0 | 46 | 0 | NULL | NULL | 1 | NULL | NULL | NULL |
| 11.xxx.xxx.xxx | 28825 | 1004 | 331 | 7 | 0 | 8 | NULL | NULL | 331 | NULL | NULL | NULL |
| 11.xxx.xxx.xxx | 28825 | 1004 | 377 | 0 | 116 | 0 | NULL | NULL | 377 | NULL | NULL | NULL |
| 11.xxx.xxx.xxx | 28825 | 1004 | 519 | 59 | 0 | 0 | NULL | NULL | 519 | NULL | NULL | NULL |
| 11.xxx.xxx.xxx | 28825 | 1004 | 101105 | 59 | 0 | 0 | NULL | NULL | 101105 | NULL | NULL | NULL |
| 11.xxx.xxx.xxx | 28825 | 1004 | 101106 | 59 | 0 | 0 | NULL | NULL | 101106 | NULL | NULL | NULL |
| 11.xxx.xxx.xxx | 28825 | 1004 | 500019 | 58 | 0 | 0 | NULL | NULL | 200014 | NULL | NULL | NULL |
+----------------+----------+---------+--------+------+------+------+---------+---------+---------+----------+-------+--------+
21 rows in set