Note
This view is available starting with V4.0.0.
Purpose
This view displays information about all tablet replicas in the current tenant. Each tablet replica is uniquely identified by the joint key: <TENANT_ID, TABLET_ID, SVR_IP, SVR_PORT, LS_ID>.
Columns
| Column | Type | Nullable | Description |
|---|---|---|---|
| CREATE_TIME | timestamp(6) | NO | The creation time of the tablet ID. |
| MODIFY_TIME | timestamp(6) | NO | The modification time of the tablet ID. |
| TENANT_ID | bigint(20) | NO | The tenant ID. |
| TABLET_ID | bigint(20) | NO | The tablet ID. |
| SVR_IP | varchar(46) | NO | The IP address of the server. |
| SVR_PORT | bigint(20) | NO | The port number of the server. |
| LS_ID | bigint(20) | NO | The ID of the log stream to which the tablet belongs. |
| COMPACTION_SCN | bigint(20) unsigned | NO | The snapshot version number. |
| DATA_SIZE | bigint(20) | NO | The actual size of the data, in bytes. |
| REQUIRED_SIZE | bigint(20) | NO | The size of the space allocated to the data, in bytes. Data storage is based on macroblocks (2 MB), so REQUIRED_SIZE >= DATA_SIZE. |
Sample query
In the sys tenant, query the tablet replica information of the tenant with ID 1002 and display the first 10 records.
obclient [oceanbase]> SELECT * FROM oceanbase.CDB_OB_TABLET_REPLICAS WHERE TENANT_ID = 1002 LIMIT 10;
The query result is as follows:
+----------------------------+----------------------------+-----------+-----------+----------------+----------+-------+---------------------+-----------+---------------+
| CREATE_TIME | MODIFY_TIME | TENANT_ID | TABLET_ID | SVR_IP | SVR_PORT | LS_ID | COMPACTION_SCN | DATA_SIZE | REQUIRED_SIZE |
+----------------------------+----------------------------+-----------+-----------+----------------+----------+-------+---------------------+-----------+---------------+
| 2024-12-31 14:59:45.377678 | 2025-01-02 02:59:28.302290 | 1002 | 1 | 172.xx.xxx.xxx | 2882 | 1 | 1735754402003130000 | 25048 | 2097152 |
| 2024-12-31 14:59:45.378161 | 2025-01-02 02:59:28.302290 | 1002 | 3 | 172.xx.xxx.xxx | 2882 | 1 | 1735754402003130000 | 382361 | 2097152 |
| 2024-12-31 14:59:45.386361 | 2025-01-02 02:59:28.302290 | 1002 | 4 | 172.xx.xxx.xxx | 2882 | 1 | 1735754402003130000 | 253313 | 2097152 |
| 2024-12-31 14:59:45.386361 | 2025-01-02 02:59:28.302290 | 1002 | 5 | 172.xx.xxx.xxx | 2882 | 1 | 1735754402003130000 | 29939 | 2097152 |
| 2024-12-31 14:59:45.386361 | 2025-01-02 02:59:28.302290 | 1002 | 102 | 172.xx.xxx.xxx | 2882 | 1 | 1735754402003130000 | 2095 | 2097152 |
| 2024-12-31 14:59:45.386361 | 2025-01-02 02:59:28.289712 | 1002 | 103 | 172.xx.xxx.xxx | 2882 | 1 | 1735754402003130000 | 2232 | 2097152 |
| 2024-12-31 14:59:45.386361 | 2025-01-02 02:59:28.302290 | 1002 | 104 | 172.xx.xxx.xxx | 2882 | 1 | 1735754402003130000 | 968 | 2097152 |
| 2024-12-31 14:59:45.385814 | 2025-01-02 02:59:28.302290 | 1002 | 105 | 172.xx.xxx.xxx | 2882 | 1 | 1735754402003130000 | 1093 | 2097152 |
| 2024-12-31 14:59:45.387221 | 2025-01-02 02:59:28.302290 | 1002 | 106 | 172.xx.xxx.xxx | 2882 | 1 | 1735754402003130000 | 1178 | 2097152 |
| 2024-12-31 14:59:45.386251 | 2025-01-02 02:59:28.302290 | 1002 | 107 | 172.xx.xxx.xxx | 2882 | 1 | 1735754402003130000 | 1232 | 2097152 |
+----------------------------+----------------------------+-----------+-----------+----------------+----------+-------+---------------------+-----------+---------------+
10 rows in set