Note
This view is introduced since OceanBase Database V4.0.0.
Purpose
This view displays DML information in the current user's table on the current OBServer node of the current 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 ID of the tenant. |
| OBJN | bigint(20) | NO | The ID of the object. |
| INS | bigint(20) | NO | The approximate number of insert operations performed since the statistics were last collected. |
| UPD | bigint(20) | NO | The approximate number of update operations performed since the statistics were last collected. |
| DEL | bigint(20) | NO | The approximate number of delete operations performed since the statistics were last collected. |
| DROPSEG | bigint(0) | NO | The value of this field is currently unsupported, and the default value is NULL. |
| CURROWS | bigint(0) | NO | The value of this field is currently unsupported, and the default value is NULL. |
| PAROBJN | bigint(20) | NO | The value of this field is currently unsupported, and the default value is NULL. |
| LASTUSED | bigint(0) | NO | The value of this field is currently unsupported, and the default value is NULL. |
| FLAGS | bigint(0) | NO | The value of this field is currently unsupported, and the default value is NULL. |
| CON_ID | bigint(0) | NO | The value of this field is currently unsupported, and the default value is NULL. |
Sample query
Check the DML information of the user tables in the current tenant on the current OBServer node.
obclient [oceanbase]> SELECT * FROM oceanbase.V$DML_STATS;
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 | 1002 | 1 | 0 | 18 | 0 | NULL | NULL | 1 | NULL | NULL | NULL |
| 11.xxx.xxx.xxx | 28825 | 1002 | 331 | 5 | 0 | 3 | NULL | NULL | 331 | NULL | NULL | NULL |
| 11.xxx.xxx.xxx | 28825 | 1002 | 519 | 1 | 0 | 0 | NULL | NULL | 519 | NULL | NULL | NULL |
| 11.xxx.xxx.xxx | 28825 | 1002 | 101105 | 1 | 0 | 0 | NULL | NULL | 101105 | NULL | NULL | NULL |
| 11.xxx.xxx.xxx | 28825 | 1002 | 101106 | 1 | 0 | 0 | NULL | NULL | 101106 | NULL | NULL | NULL |
+----------------+----------+---------+--------+------+------+------+---------+---------+---------+----------+-------+--------+
5 rows in set