Overview
The GV$OB_TABLET_REPLICA_INFO view displays basic information about all tablet replicas on each node of all tenants, including the tenant to which they belong, log stream, table, database, and disk usage.
Columns
Field Name |
Type |
Whether can be NULL |
Description |
|---|---|---|---|
| SVR_IP | varchar(46) | NO | Node IP Address |
| SVR_PORT | bigint(20) | NO | Node Port Number |
| TENANT_ID | bigint(20) | NO | Tenant ID |
| LS_ID | bigint(20) | NO | Log Stream ID |
| TABLET_ID | bigint(20) | NO | Tablet replica ID |
| ROLE | varchar(8) | NO | Log stream roles:
|
| ZONE | varchar(128) | NO | Zone of Tablet Replica |
| TABLE_ID | bigint(20) | NO | ID of the table to which the tablet replica belongs |
| TABLE_NAME | varchar(256) | NO | Table name of the tablet replica |
| DATABASE_ID | bigint(20) | NO | 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 | Table type:
|
| TABLEGROUP_ID | bigint(20) | NO | Table group ID |
| TABLEGROUP_NAME | varchar(128) | NO | Table group name |
| DATA_TABLE_ID | bigint(20) | NO | Data table ID of the table. |
| OCCUPY_SIZE | bigint(20) | NO | The actual data size occupied by the tablet replica, in bytes. |
| REQUIRED_SIZE | bigint(20) | NO | The size of space required for tablet replica data, in bytes. |
| OBJECT_ID | bigint(20) | NO | The ID of the partition or subpartition object. For a non-partitioned table, it displays as the table's table_id. |
| PARTITION_NAME | varchar(64) | NO | The name of the partition. For a non-partitioned table, this field is empty. |
| SUBPARTITION_NAME | varchar(64) | NO | Subpartition name. If the table is not a partitioned table, this field displays empty. |
Sample query
The system tenant queries the basic information of all tablet replicas of the tenant with ID 1002 on each node and displays 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