Note
The view V$SERVER_MEMSTORE was renamed to V$OB_MEMSTORE starting from V4.0.0. In V4.0.0 and later versions, you must use the new view name V$OB_MEMSTORE to query. Using the old view name V$SERVER_MEMSTORE will result in an error.
Purpose
This view displays the MemStore statistics of all tenants on the current node.
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 usage of the active MemTable (which may be an overestimation). Unit: bytes. |
| FREEZE_TRIGGER | bigint(20) | NO | The memory size at which the MemTable is frozen. 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 of the MemTable. Unit: bytes. |
Sample query
Query the memory usage of the MemTable for a tenant with ID 1002 on all servers.
obclient [oceanbase]> SELECT * FROM oceanbase.V$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 | 62914560 | 603982068 | 0 | 62914560 | 2684354550 |
+----------------+----------+-----------+-------------+----------------+------------+---------------+----------------+
1 row in set
References
Display the MemStore statistics on all nodes: GV$OB_MEMSTORE
Display the details of the MemTable for all partitions on the current node: V$OB_MEMSTORE_INFO
