Note
The GV$SERVER_MEMSTORE view has been renamed as GV$OB_MEMSTORE since OceanBase Database V4.0.0. If you query the GV$SERVER_MEMSTORE view in OceanBase Database V4.0.0 or later, an error is returned.
Purpose
The GV$OB_MEMSTORE view displays the memory usage of all MemTables of all tenants on all OBServer nodes.
Columns
| Column | Type | Nullable? | Description |
|---|---|---|---|
| SVR_IP | VARCHAR2(46) | NO | The IP address of the OBServer node. |
| SVR_PORT | NUMBER(38) | NO | The port number of the OBServer node. |
| TENANT_ID | NUMBER(38) | NO | The ID of the tenant. |
| ACTIVE_SPAN | NUMBER(38) | NO | The estimated memory in bytes that the active MemTables occupy. The value may be larger than actual size. |
| FREEZE_TRIGGER | NUMBER(38) | NO | The memory size in bytes that triggers a MemTable freeze. |
| FREEZE_CNT | NUMBER(38) | NO | The number of MemTable freezes. |
| MEMSTORE_USED | NUMBER(38) | NO | The total memory in bytes currently used by MemTables. |
| MEMSTORE_LIMIT | NUMBER(38) | NO | The maximum size in bytes of memory that MemTables can occupy. |
Sample query
Query the memory usage of MemTables of a user tenant on all OBServer nodes from the user tenant.
obclient [SYS]> SELECT * FROM SYS.GV$OB_MEMSTORE;
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 | 1004 | 25165824 | 603982068 | 0 | 25165824 | 2684354550 |
+----------------+----------+-----------+-------------+----------------+------------+---------------+----------------+
1 row in set