Note
The V$SERVER_MEMSTORE view has been renamed as V$OB_MEMSTORE since OceanBase Database V4.0.0. If you query the V$SERVER_MEMSTORE view in OceanBase Database V4.0.0 or later, an error is returned.
Purpose
The V$OB_MEMSTORE view displays the MemStore statistics of all tenants on all OBServer nodes.
Columns
| Column | Type | Nullable? | Description |
|---|---|---|---|
| SVR_IP | varchar(46) | NO | The IP address of the OBServer node. |
| SVR_PORT | bigint(20) | NO | The port number of the OBServer node. |
| TENANT_ID | bigint(20) | NO | The ID of the tenant. |
| ACTIVE_SPAN | bigint(20) | NO | The estimated memory in bytes that the active MemTables occupy. The value may be larger than actual size. |
| FREEZE_TRIGGER | bigint(20) | NO | The memory size in bytes that triggers a MemTable freeze. |
| FREEZE_CNT | bigint(20) | NO | The number of MemTable freezes. |
| MEMSTORE_USED | bigint(20) | NO | The total memory in bytes currently used by MemTables. |
| MEMSTORE_LIMIT | bigint(20) | NO | The maximum size in bytes of memory that MemTables can occupy. |
Sample query
Query the memory usage of MemTables of a tenant with the ID of 1002 on all OBServer nodes from the sys tenant.
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