Note
This view is available starting with V4.4.0.
Purpose
This view displays information about SSTables in shared storage for 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 in the columnar storage. |
| 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 largest 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 with a specified TABLET_ID in a specified log stream.
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