Note
The view GV$SERVER_MEMSTORE was renamed to GV$OB_MEMSTORE starting from V4.0.0. In V4.0.0 and later, you must use the new view name GV$OB_MEMSTORE to query data. Using the old view name GV$SERVER_MEMSTORE will result in an error.
Purpose
This view displays the memory usage of MemTables for all tenants on all servers.
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. |
| TENANT_ID | bigint(20) | NO | The tenant ID. |
| ACTIVE_SPAN | bigint(20) | NO | The estimated memory size occupied by the active MemTable (may be larger than the actual value). Unit: bytes. |
| FREEZE_TRIGGER | bigint(20) | NO | The memory size that triggers the freezing of the MemTable. Unit: bytes. |
| FREEZE_CNT | bigint(20) | NO | The number of times the MemTable has been frozen. |
| MEMSTORE_USED | bigint(20) | NO | The total memory size currently used by the MemTable. Unit: bytes. |
| MEMSTORE_LIMIT | bigint(20) | NO | The memory size limit for the MemTable. Unit: bytes. |
Sample query
Query the memory usage of MemTables for the tenant with ID 1002 on all servers in the sys tenant.
obclient [oceanbase]> SELECT * FROM oceanbase.GV$OB_MEMSTORE WHERE TENANT_ID=1002;
The query result is as follows:
+----------------+----------+-----------+-------------+----------------+------------+---------------+----------------+
| SVR_IP | SVR_PORT | TENANT_ID | ACTIVE_SPAN | FREEZE_TRIGGER | FREEZE_CNT | MEMSTORE_USED | MEMSTORE_LIMIT |
+----------------+----------+-----------+-------------+----------------+------------+---------------+----------------+
| 172.xx.xxx.xxx | 2882 | 1002 | 0 | 496607888 | 0 | 0 | 2147483640 |
| 172.xx.xxx.xxx | 2882 | 1002 | 37748736 | 496607888 | 0 | 37748736 | 2147483640 |
| 172.xx.xxx.xxx | 2882 | 1002 | 0 | 496607888 | 0 | 0 | 2147483640 |
+----------------+----------+-----------+-------------+----------------+------------+---------------+----------------+
3 rows in set