Note
This view is available starting with V4.0.0.
Purpose
This view displays 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 time when the tablet replica was created. |
| MODIFY_TIME | timestamp(6) | NO | The time when the tablet replica was last modified. |
| TABLET_ID | bigint(20) | NO | The ID of the tablet replica. |
| 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 replica belongs. |
| COMPACTION_SCN | bigint(20) unsigned | NO | The data snapshot version number. |
| DATA_SIZE | bigint(20) | NO | The actual size of the data. |
| REQUIRED_SIZE | bigint(20) | NO | The size of the space allocated for the data. Data is stored in macroblocks (2 MB) as the minimum unit, so REQUIRED_SIZE >= DATA_SIZE |
Sample query
Query the tablet replica information of the current tenant as the sys tenant and display the first 10 records.
obclient [oceanbase]> SELECT * FROM oceanbase.DBA_OB_TABLET_REPLICAS LIMIT 10;
The query result is as follows:
+----------------------------+----------------------------+-----------+----------------+----------+-------+---------------------+-----------+---------------+
| CREATE_TIME | MODIFY_TIME | TABLET_ID | SVR_IP | SVR_PORT | LS_ID | COMPACTION_SCN | DATA_SIZE | REQUIRED_SIZE |
+----------------------------+----------------------------+-----------+----------------+----------+-------+---------------------+-----------+---------------+
| 2024-12-31 14:57:13.353724 | 2025-01-02 02:55:59.092589 | 1 | 172.xx.xxx.xxx | 2882 | 1 | 1735754403442116000 | 25041 | 2097152 |
| 2024-12-31 14:57:11.999513 | 2025-01-02 02:55:59.092589 | 3 | 172.xx.xxx.xxx | 2882 | 1 | 1735754403442116000 | 532350 | 2097152 |
| 2024-12-31 14:57:11.999513 | 2025-01-02 02:55:59.087812 | 4 | 172.xx.xxx.xxx | 2882 | 1 | 1735754403442116000 | 369280 | 2097152 |
| 2024-12-31 14:57:12.014381 | 2025-01-02 02:55:59.092589 | 5 | 172.xx.xxx.xxx | 2882 | 1 | 1735754403442116000 | 203691 | 2097152 |
| 2024-12-31 14:57:12.014381 | 2025-01-02 02:55:59.092589 | 102 | 172.xx.xxx.xxx | 2882 | 1 | 1735754403442116000 | 2107 | 2097152 |
| 2024-12-31 14:57:12.014381 | 2025-01-02 02:55:59.092589 | 103 | 172.xx.xxx.xxx | 2882 | 1 | 1735754403442116000 | 2241 | 2097152 |
| 2024-12-31 14:57:12.014381 | 2025-01-02 02:55:59.087812 | 104 | 172.xx.xxx.xxx | 2882 | 1 | 1735754403442116000 | 1037 | 2097152 |
| 2024-12-31 14:57:12.014381 | 2025-01-02 02:55:59.100588 | 105 | 172.xx.xxx.xxx | 2882 | 1 | 1735754403442116000 | 1165 | 2097152 |
| 2024-12-31 14:57:12.014381 | 2025-01-02 02:55:59.092589 | 106 | 172.xx.xxx.xxx | 2882 | 1 | 1735754403442116000 | 1178 | 2097152 |
| 2024-12-31 14:57:12.014381 | 2025-01-02 02:55:59.092589 | 107 | 172.xx.xxx.xxx | 2882 | 1 | 1735754403442116000 | 1232 | 2097152 |
+----------------------------+----------------------------+-----------+----------------+----------+-------+---------------------+-----------+---------------+
10 rows in set