Note
This view is introduced since OceanBase Database V4.0.0.
Purpose
The V$OB_SSTABLES view displays information about the MemTables and SSTables in each partition on the current OBServer node.
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. |
| TABLE_TYPE | varchar(20) | NO | The type of the table. |
| TENANT_ID | bigint(20) | NO | The ID of the tenant. |
| LS_ID | bigint(20) | NO | The ID of the log stream. |
| TABLET_ID | bigint(20) | NO | The ID of the tablet. |
| START_LOG_SCN | bigint(20) unsigned | NO | The first recorded log timestamp of the data in the table. |
| END_LOG_SCN | bigint(20) unsigned | NO | The last recorded log timestamp of the data in the table. |
| SIZE | bigint(20) | NO | The occupied disk space, in bytes. |
| REF | bigint(20) | NO | The number of references to the table. |
| UPPER_TRANS_VERSION | bigint(20) unsigned | NO | The maximum transaction version of the committed transactions. |
| IS_ACTIVE | varchar(3) | NO | Indicates whether the MemTable is active. |
| CONTAIN_UNCOMMITTED_ROW | varchar(3) | NO | Indicates whether the table contains uncommitted transaction rows. Valid values: NO: The table does not contain any uncommitted transaction rows.YES: The table contains uncommitted transaction rows. |
Sample query
Query the MemTable and SSTable information of partition 1001 of the log stream in the user's tenant on the current OBServer node.
obclient [oceanbase]> SELECT * FROM oceanbase.V$OB_SSTABLES WHERE LS_ID=1001;
The query result is as follows:
+----------------+----------+------------------+-----------+-------+-----------+---------------------+---------------------+---------+------+---------------------+-----------+-------------------------+
| SVR_IP | SVR_PORT | TABLE_TYPE | TENANT_ID | LS_ID | TABLET_ID | START_LOG_SCN | END_LOG_SCN | SIZE | REF | UPPER_TRANS_VERSION | IS_ACTIVE | CONTAIN_UNCOMMITTED_ROW |
+----------------+----------+------------------+-----------+-------+-----------+---------------------+---------------------+---------+------+---------------------+-----------+-------------------------+
| 11.xxx.xxx.xxx | 28825 | MAJOR | 1002 | 1001 | 200032 | 0 | 1743357601718033000 | 380 | 0 | 1743155516647021000 | NO | NO |
| 11.xxx.xxx.xxx | 28825 | MINOR | 1002 | 1001 | 49402 | 1 | 1743155746972459000 | 3244 | 0 | 4096 | NO | NO |
| 11.xxx.xxx.xxx | 28825 | TX_DATA_MEMTABLE | 1002 | 1001 | 49402 | 1743155746972459000 | 4611686018427387903 | 1048576 | 3 | 0 | YES | YES |
| 11.xxx.xxx.xxx | 28825 | MAJOR | 1002 | 1001 | 200037 | 0 | 1743357601718033000 | 0 | 0 | 1743357601718033000 | NO | NO |
| 11.xxx.xxx.xxx | 28825 | MAJOR | 1002 | 1001 | 200015 | 0 | 1743357601718033000 | 411 | 0 | 1742957323483246000 | NO | NO |
| 11.xxx.xxx.xxx | 28825 | MAJOR | 1002 | 1001 | 200031 | 0 | 1743357601718033000 | 380 | 0 | 1743155516647021000 | NO | NO |
| 11.xxx.xxx.xxx | 28825 | MAJOR | 1002 | 1001 | 200007 | 0 | 1743357601718033000 | 643 | 0 | 1742541257735502000 | NO | NO |
| 11.xxx.xxx.xxx | 28825 | MAJOR | 1002 | 1001 | 200014 | 0 | 1743357601718033000 | 411 | 0 | 1742957323483246000 | NO | NO |
| 11.xxx.xxx.xxx | 28825 | MAJOR | 1002 | 1001 | 200030 | 0 | 1743357601718033000 | 380 | 0 | 1743155516647021000 | NO | NO |
| 11.xxx.xxx.xxx | 28825 | MAJOR | 1002 | 1001 | 200021 | 0 | 1743357601718033000 | 389 | 0 | 1743155475021424000 | NO | NO |
| 11.xxx.xxx.xxx | 28825 | MAJOR | 1002 | 1001 | 200016 | 0 | 1743357601718033000 | 411 | 0 | 1742957323483246000 | NO | NO |
| 11.xxx.xxx.xxx | 28825 | MAJOR | 1002 | 1001 | 200020 | 0 | 1743357601718033000 | 380 | 0 | 1743155475021424000 | NO | NO |
| 11.xxx.xxx.xxx | 28825 | MAJOR | 1002 | 1001 | 200038 | 0 | 1743357601718033000 | 0 | 0 | 1743357601718033000 | NO | NO |
| 11.xxx.xxx.xxx | 28825 | MAJOR | 1002 | 1001 | 200005 | 0 | 1743357601718033000 | 643 | 0 | 1742541257735502000 | NO | NO |
| 11.xxx.xxx.xxx | 28825 | MAJOR | 1002 | 1001 | 200036 | 0 | 1743357601718033000 | 0 | 0 | 1743357601718033000 | NO | NO |
| 11.xxx.xxx.xxx | 28825 | MAJOR | 1002 | 1001 | 200012 | 0 | 1743357601718033000 | 0 | 0 | 1743357601718033000 | NO | NO |
| 11.xxx.xxx.xxx | 28825 | MAJOR | 1002 | 1001 | 200018 | 0 | 1743357601718033000 | 384 | 0 | 1743152704981127000 | NO | NO |
| 11.xxx.xxx.xxx | 28825 | MAJOR | 1002 | 1001 | 200013 | 0 | 1743357601718033000 | 406 | 0 | 1742957323483246000 | NO | NO |
| 11.xxx.xxx.xxx | 28825 | MAJOR | 1002 | 1001 | 49401 | 0 | 1 | 0 | 0 | 1 | NO | NO |
| 11.xxx.xxx.xxx | 28825 | TX_CTX_MEMTABLE | 1002 | 1001 | 49401 | 1 | 2 | 0 | 2 | 0 | YES | YES |
| 11.xxx.xxx.xxx | 28825 | MAJOR | 1002 | 1001 | 200004 | 0 | 1743357601718033000 | 961 | 0 | 1742541257735502000 | NO | NO |
| 11.xxx.xxx.xxx | 28825 | MAJOR | 1002 | 1001 | 200033 | 0 | 1743357601718033000 | 0 | 0 | 1743357601718033000 | NO | NO |
| 11.xxx.xxx.xxx | 28825 | MAJOR | 1002 | 1001 | 49403 | 0 | 1 | 0 | 0 | 1 | NO | NO |
| 11.xxx.xxx.xxx | 28825 | LOCK_MEMTABLE | 1002 | 1001 | 49403 | 1 | 2 | 0 | 3 | 0 | YES | YES |
| 11.xxx.xxx.xxx | 28825 | MAJOR | 1002 | 1001 | 200002 | 0 | 1743357601718033000 | 933 | 0 | 1742541257735502000 | NO | NO |
| 11.xxx.xxx.xxx | 28825 | MAJOR | 1002 | 1001 | 200019 | 0 | 1743357601718033000 | 0 | 0 | 1743357601718033000 | NO | NO |
| 11.xxx.xxx.xxx | 28825 | MAJOR | 1002 | 1001 | 200003 | 0 | 1743357601718033000 | 774 | 0 | 1742541257735502000 | NO | NO |
+----------------+----------+------------------+-----------+-------+-----------+---------------------+---------------------+---------+------+---------------------+-----------+-------------------------+
27 rows in set