Note
This view is available starting with V4.6.0.
Purpose
The GV$OB_TABLET_REPLICA_INFO view displays the basic information of all tablet replicas on each node for all tenants. The information includes the tenant, log stream, table, database, and disk space occupied by the tablet replicas.
Columns
| Column | Type | Nullable | Description |
|---|---|---|---|
| SVR_IP | varchar(46) | NO | The IP address of the node. |
| SVR_PORT | bigint(20) | NO | The port number of the node. |
| TENANT_ID | bigint(20) | NO | The tenant ID. |
| LS_ID | bigint(20) | NO | The log stream ID. |
| TABLET_ID | bigint(20) | NO | The ID of the tablet replica. |
| ROLE | varchar(8) | NO | The role of the log stream:
|
| ZONE | varchar(128) | NO | The zone where the tablet replica is located. |
| TABLE_ID | bigint(20) | NO | The ID of the table to which the tablet replica belongs. |
| TABLE_NAME | varchar(256) | NO | The name of the table to which the tablet replica belongs. |
| DATABASE_ID | bigint(20) | NO | The ID of the database to which the table belongs. |
| DATABASE_NAME | varchar(128) | NO | The name of the database to which the table belongs. |
| TABLE_TYPE | varchar(21) | NO | The type of the table:
|
| TABLEGROUP_ID | bigint(20) | NO | The ID of the table group to which the table belongs. |
| TABLEGROUP_NAME | varchar(128) | NO | The name of the table group to which the table belongs. |
| DATA_TABLE_ID | bigint(20) | NO | The data_table_id of the table. |
| OCCUPY_SIZE | bigint(20) | NO | The actual size of the space occupied by the tablet replica data, in bytes. |
| REQUIRED_SIZE | bigint(20) | NO | The size of the space required for the tablet replica data, in bytes. |
| OBJECT_ID | bigint(20) | NO | The ID of the partition or subpartition object. If the table is not partitioned, this column displays the table_id of the table. |
| PARTITION_NAME | varchar(64) | NO | The name of the partition. If the table is not partitioned, this column is empty. |
| SUBPARTITION_NAME | varchar(64) | NO | The name of the subpartition. If the table is not partitioned, this column is empty. |
Sample query
Query the basic information of all tablet replicas on each node for tenant 1002 in the sys tenant, and display the first two records.
obclient(root@sys)[oceanbase]> SELECT * FROM oceanbase.GV$OB_TABLET_REPLICA_INFO WHERE TENANT_ID = 1002 LIMIT 2\G
The query result is as follows:
*************************** 1. row ***************************
SVR_IP: 6.xx.xxx.xxx
SVR_PORT: 2882
TENANT_ID: 1002
LS_ID: 1
TABLET_ID: 60577
ROLE: LEADER
ZONE: zone1
TABLE_ID: 60577
TABLE_NAME: __all_tablet_to_global_temporary_table_aux_lob_piece
DATABASE_ID: 201001
DATABASE_NAME: oceanbase
TABLE_TYPE: LOB AUX TABLE
TABLEGROUP_ID: 202001
TABLEGROUP_NAME: oceanbase
DATA_TABLE_ID: 577
OCCUPY_SIZE: 500
REQUIRED_SIZE: 4096
OBJECT_ID: 60577
PARTITION_NAME: NULL
SUBPARTITION_NAME: NULL
*************************** 2. row ***************************
SVR_IP: 6.xx.xxx.xxx
SVR_PORT: 2882
TENANT_ID: 1002
LS_ID: 1
TABLET_ID: 60191
ROLE: LEADER
ZONE: zone1
TABLE_ID: 60191
TABLE_NAME: __all_routine_param_aux_lob_piece
DATABASE_ID: 201001
DATABASE_NAME: oceanbase
TABLE_TYPE: LOB AUX TABLE
TABLEGROUP_ID: 202001
TABLEGROUP_NAME: oceanbase
DATA_TABLE_ID: 191
OCCUPY_SIZE: 500
REQUIRED_SIZE: 4096
OBJECT_ID: 60191
PARTITION_NAME: NULL
SUBPARTITION_NAME: NULL
2 rows in set
