Note
This view is introduced since OceanBase Database V4.0.0.
Purpose
The GV$OB_SSTABLES view displays information about the MemTables and SSTables in each partition 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. |
| TABLE_TYPE | VARCHAR2(20) | NO | The type of the table. |
| LS_ID | NUMBER(38) | NO | The ID of the log stream. |
| TABLET_ID | NUMBER(38) | NO | The ID of the tablet. |
| START_LOG_SCN | NUMBER(38) | NO | The first recorded log timestamp of the data in the table. |
| END_LOG_SCN | NUMBER(38) | NO | The last recorded log timestamp of the data in the table. |
| SIZE | NUMBER(38) | NO | The occupied disk space, in bytes. |
| REF | NUMBER(38) | NO | The number of references to the table. |
| UPPER_TRANS_VERSION | NUMBER(38) | NO | The maximum transaction version of the committed transactions. |
| IS_ACTIVE | VARCHAR2(3) | NO | Indicates whether the MemTable is active. |
| CONTAIN_UNCOMMITTED_ROW | VARCHAR2(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
View the MemTable and SSTable information of partition 1001 in all OBServer nodes in the user tenant.
obclient [SYS]> SELECT * FROM SYS.GV$OB_SSTABLES WHERE LS_ID=1001;
The query result is as follows:
+----------------+----------+------------------+-------+-----------+---------------------+---------------------+----------+------+---------------------+-----------+-------------------------+
| SVR_IP | SVR_PORT | TABLE_TYPE | 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 | 1001 | 49402 | 0 | 1 | 0 | 0 | 1 | NO | NO |
| 11.xxx.xxx.xxx | 28825 | MINOR | 1001 | 49402 | 1 | 1743391602135333001 | 4007 | 0 | 4096 | NO | NO |
| 11.xxx.xxx.xxx | 28825 | TX_DATA_MEMTABLE | 1001 | 49402 | 1743391602135333001 | 4611686018427387903 | 1048576 | 3 | 0 | YES | YES |
| 11.xxx.xxx.xxx | 28825 | MAJOR | 1001 | 200008 | 0 | 1743357601723336000 | 634 | 0 | 1742884853812859000 | NO | NO |
| 11.xxx.xxx.xxx | 28825 | MAJOR | 1001 | 200017 | 0 | 1743357601723336000 | 0 | 0 | 1743357601723336000 | NO | NO |
| 11.xxx.xxx.xxx | 28825 | MAJOR | 1001 | 200059 | 0 | 1743357601723336000 | 0 | 0 | 1743357601723336000 | NO | NO |
| 11.xxx.xxx.xxx | 28825 | MAJOR | 1001 | 200015 | 0 | 1743357601723336000 | 0 | 0 | 1743357601723336000 | NO | NO |
| 11.xxx.xxx.xxx | 28825 | MAJOR | 1001 | 200007 | 0 | 1743357601723336000 | 710 | 0 | 1742884853812859000 | NO | NO |
| 11.xxx.xxx.xxx | 28825 | MAJOR | 1001 | 200024 | 0 | 1743357601723336000 | 383 | 0 | 1743153227043218000 | NO | NO |
| 11.xxx.xxx.xxx | 28825 | MAJOR | 1001 | 200016 | 0 | 1743357601723336000 | 0 | 0 | 1743357601723336000 | NO | NO |
| 11.xxx.xxx.xxx | 28825 | MAJOR | 1001 | 200005 | 0 | 1743357601723336000 | 720 | 0 | 1742884853812859000 | NO | NO |
| 11.xxx.xxx.xxx | 28825 | MAJOR | 1001 | 200060 | 0 | 1743357601723336000 | 0 | 0 | 1743357601723336000 | NO | NO |
| 11.xxx.xxx.xxx | 28825 | MEMTABLE | 1001 | 200060 | 1 | 4611686018427387903 | 62914560 | 2 | 9223372036854775807 | YES | YES |
| 11.xxx.xxx.xxx | 28825 | MAJOR | 1001 | 200012 | 0 | 1743357601723336000 | 624 | 0 | 1742884853812859000 | NO | NO |
| 11.xxx.xxx.xxx | 28825 | MAJOR | 1001 | 200018 | 0 | 1743357601723336000 | 0 | 0 | 1743357601723336000 | NO | NO |
| 11.xxx.xxx.xxx | 28825 | MAJOR | 1001 | 200013 | 0 | 1743357601723336000 | 623 | 0 | 1742884853812859000 | NO | NO |
| 11.xxx.xxx.xxx | 28825 | MAJOR | 1001 | 49401 | 0 | 1 | 0 | 0 | 1 | NO | NO |
| 11.xxx.xxx.xxx | 28825 | TX_CTX_MEMTABLE | 1001 | 49401 | 1 | 2 | 0 | 2 | 0 | YES | YES |
| 11.xxx.xxx.xxx | 28825 | MAJOR | 1001 | 200004 | 0 | 1743357601723336000 | 720 | 0 | 1742884853812859000 | NO | NO |
| 11.xxx.xxx.xxx | 28825 | MAJOR | 1001 | 49403 | 0 | 1 | 0 | 0 | 1 | NO | NO |
| 11.xxx.xxx.xxx | 28825 | MINI | 1001 | 49403 | 1 | 1743045514426661000 | 0 | 0 | 1743045514426661000 | NO | NO |
| 11.xxx.xxx.xxx | 28825 | LOCK_MEMTABLE | 1001 | 49403 | 1 | 1743045514426661000 | 0 | 3 | 0 | YES | YES |
| 11.xxx.xxx.xxx | 28825 | MAJOR | 1001 | 200002 | 0 | 1743357601723336000 | 874 | 0 | 1742884853812859000 | NO | NO |
| 11.xxx.xxx.xxx | 28825 | MAJOR | 1001 | 200003 | 0 | 1743357601723336000 | 838 | 0 | 1742884853812859000 | NO | NO |
| 11.xxx.xxx.xxx | 28825 | MAJOR | 1001 | 200006 | 0 | 1743357601723336000 | 725 | 0 | 1742884853812859000 | NO | NO |
| 11.xxx.xxx.xxx | 28825 | MAJOR | 1001 | 200010 | 0 | 1743357601723336000 | 653 | 0 | 1742884853812859000 | NO | NO |
| 11.xxx.xxx.xxx | 28825 | MAJOR | 1001 | 200009 | 0 | 1743357601723336000 | 638 | 0 | 1742884853812859000 | NO | NO |
| 11.xxx.xxx.xxx | 28825 | MAJOR | 1001 | 200011 | 0 | 1743357601723336000 | 633 | 0 | 1742884853812859000 | NO | NO |
| 11.xxx.xxx.xxx | 28825 | MAJOR | 1001 | 200001 | 0 | 1743357601723336000 | 0 | 0 | 1743357601723336000 | NO | NO |
+----------------+----------+------------------+-------+-----------+---------------------+---------------------+----------+------+---------------------+-----------+-------------------------+
29 rows in set