Note
This view is available starting with V4.4.0.
Purpose
This view displays information about SSTables on the shared storage of the current tenant.
Applicability
This view is applicable only to the Shared-Storage (SS) mode. In the Shared-Nothing (SN) mode, the query result 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 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 actual disk space occupied by the SSTable, in bytes. |
| REC_SCN | bigint(20) | NO | The log replay point after the SSTable is uploaded. |
| UPPER_TRANS_VERSION | bigint(20) | NO | The largest transaction commit version number in the SSTable. |
| CONTAIN_UNCOMMITTED_ROW | varchar(3) | NO | Indicates whether the data contains uncommitted data. |
Sample query
In the user tenant, query the information about the SSTables of the specified tablet in the specified log stream.
obclient> SELECT * FROM oceanbase.V$OB_SS_SSTABLES WHERE LS_ID=1 AND TABLET_ID=60263;
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 |
+-----------+-------+-----------+--------------+------------+--------+---------------------+---------------------+---------------+---------+---------------------+---------------------+-------------------------+
| 1004 | 1 | 60263 | 0 | MAJOR | 0 | 0 | 1752084004249010000 | 0 | 0 | 0 | 1752084004249010000 | NO |
+-----------+-------+-----------+--------------+------------+--------+---------------------+---------------------+---------------+---------+---------------------+---------------------+-------------------------+
1 row in set