Note
This view is available starting with V4.4.0.
Purpose
This view displays the information about SSTables in the shared storage of all tenants.
Applicability
This view is applicable only to the Shared-Storage (SS) mode. In the Shared-Nothing (SN) mode, the query result of this view is empty.
Columns
| Column | Type | Nullable | Description |
|---|---|---|---|
| TENANT_ID | bigint(20) | NO | The tenant ID. |
| LS_ID | bigint(20) | NO | The log stream ID. |
| TABLET_ID | bigint(20) | NO | The tablet ID. |
| TRANSFER_SCN | bigint(20) | NO | The transfer version number. |
| TABLE_TYPE | varchar(20) | NO | The type of the SSTable. Valid values: MAJOR, MINOR, MINI, META, DDL_DUMP, CO_MAJOR, NORMAL_CG, ROWKEY_CG, COL_ORIENTED_META, DDL_MERGE_CO, DDL_MERGE_CG, DDL_MEM_CO, DDL_MEM_CG, DDL_MEM_MINI_SSTABLE, MDS_MINI, MDS_MINOR, and INVALID. |
| CG_IDX | bigint(20) | NO | The column number of the SSTable for columnar data. |
| START_LOG_SCN | bigint(20) | NO | The left boundary of the SSTable. |
| END_LOG_SCN | bigint(20) | NO | The right boundary of the SSTable. |
| DATA_CHECKSUM | bigint(20) | NO | The data checksum. |
| SIZE | bigint(20) | NO | The disk space occupied by the SSTable, in bytes. |
| REC_SCN | bigint(20) | NO | The log replay point required after the SSTable is uploaded. |
| UPPER_TRANS_VERSION | bigint(20) | NO | The maximum transaction commit version number in the SSTable. |
| CONTAIN_UNCOMMITTED_ROW | varchar(3) | NO | Indicates whether the SSTable contains uncommitted data. |
Sample query
In the sys tenant, query the information about the SSTables in a specified log stream of the current tenant.
obclient> SELECT * FROM oceanbase.V$OB_SS_SSTABLES WHERE TENANT_ID=1 AND LS_ID=1 AND TABLET_ID=49402;
The query result is as follows:
+-----------+-------+-----------+--------------+------------+--------+---------------------+---------------------+---------------+---------+---------------------+---------------------+-------------------------+
| TENANT_ID | LS_ID | TABLET_ID | TRANSFER_SCN | TABLE_TYPE | CG_IDX | START_LOG_SCN | END_LOG_SCN | DATA_CHECKSUM | SIZE | REC_SCN | UPPER_TRANS_VERSION | CONTAIN_UNCOMMITTED_ROW |
+-----------+-------+-----------+--------------+------------+--------+---------------------+---------------------+---------------+---------+---------------------+---------------------+-------------------------+
| 1 | 1 | 49402 | 0 | MAJOR | 0 | 0 | 1 | 0 | 0 | 0 | 1 | NO |
| 1 | 1 | 49402 | 0 | MINOR | 0 | 1 | 1752133576645421000 | 2166337586 | 1207789 | 1751618907845057004 | 4096 | NO |
| 1 | 1 | 49402 | 0 | MINI | 0 | 1752133576645421000 | 1752134177458042000 | 2852281408 | 427041 | 1752133576845397000 | 4096 | NO |
+-----------+-------+-----------+--------------+------------+--------+---------------------+---------------------+---------------+---------+---------------------+---------------------+-------------------------+
3 rows in set
