Note
This view is introduced since OceanBase Database V4.0.0.
Purpose
The GV$OB_TENANT_MEMORY view displays the memory usage of the current tenant in all nodes.
Columns
| Column | Type | Nullable? | Description |
|---|---|---|---|
| TENANT_ID | bigint(20) | NO | The ID of the tenant. |
| SVR_IP | varchar(46) | NO | The IP address of the OBServer node. |
| SVR_PORT | bigint(20) | NO | The port number of the OBServer node. |
| HOLD | bigint(20) | NO | The memory used by the tenant, in bytes. |
| FREE | bigint(21) | NO | The memory available for the tenant, in bytes. |
Sample query
Query the memory usage of the current tenant on all nodes.
obclient [oceanbase]> SELECT * FROM oceanbase.GV$OB_TENANT_MEMORY;
The query result is as follows:
+-----------+----------------+----------+------------+------------+
| TENANT_ID | SVR_IP | SVR_PORT | HOLD | FREE |
+-----------+----------------+----------+------------+------------+
| 1002 | 172.xx.xxx.xxx | 2882 | 718929920 | 4649779200 |
| 1002 | 172.xx.xxx.xxx | 2882 | 1165156352 | 4203552768 |
| 1002 | 172.xx.xxx.xxx | 2882 | 714735616 | 4653973504 |
+-----------+----------------+----------+------------+------------+
3 rows in set