From e8599a7d239c3fe795c84e3b9afeb3a99de8b2ec Mon Sep 17 00:00:00 2001 From: Grace Cai Date: Mon, 3 Jun 2024 17:19:25 +0800 Subject: [PATCH] information-schema: update the description for the tikv-region-status table (#17689) --- .../information-schema-tikv-region-status.md | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/information-schema/information-schema-tikv-region-status.md b/information-schema/information-schema-tikv-region-status.md index f9d225ee66b5d..417ded9a76734 100644 --- a/information-schema/information-schema-tikv-region-status.md +++ b/information-schema/information-schema-tikv-region-status.md @@ -11,13 +11,13 @@ The `TIKV_REGION_STATUS` table shows some basic information of TiKV Regions via > > This table is not available on [TiDB Serverless](https://docs.pingcap.com/tidbcloud/select-cluster-tier#tidb-serverless) clusters. -{{< copyable "sql" >}} - ```sql -USE information_schema; -DESC tikv_region_status; +USE INFORMATION_SCHEMA; +DESC TIKV_REGION_STATUS; ``` +The output is as follows: + ```sql +---------------------------+-------------+------+------+---------+-------+ | Field | Type | Null | Key | Default | Extra | @@ -31,6 +31,9 @@ DESC tikv_region_status; | IS_INDEX | tinyint(1) | NO | | 0 | | | INDEX_ID | bigint(21) | YES | | NULL | | | INDEX_NAME | varchar(64) | YES | | NULL | | +| IS_PARTITION | tinyint(1) | NO | | 0 | | +| PARTITION_ID | bigint(21) | YES | | NULL | | +| PARTITION_NAME | varchar(64) | YES | | NULL | | | EPOCH_CONF_VER | bigint(21) | YES | | NULL | | | EPOCH_VERSION | bigint(21) | YES | | NULL | | | WRITTEN_BYTES | bigint(21) | YES | | NULL | | @@ -40,7 +43,7 @@ DESC tikv_region_status; | REPLICATIONSTATUS_STATE | varchar(64) | YES | | NULL | | | REPLICATIONSTATUS_STATEID | bigint(21) | YES | | NULL | | +---------------------------+-------------+------+------+---------+-------+ -17 rows in set (0.00 sec) +20 rows in set (0.00 sec) ``` The descriptions of the columns in the `TIKV_REGION_STATUS` table are as follows: @@ -54,6 +57,9 @@ The descriptions of the columns in the `TIKV_REGION_STATUS` table are as follows * `IS_INDEX`: Whether the Region data is an index. 0 means that it is not an index, while 1 means that it is an index. If the current Region contains both table data and index data, there will be multiple rows of records, and `IS_INDEX` is 0 and 1 respectively. * `INDEX_ID`: The ID of the index to which the Region belongs. If `IS_INDEX` is 0, the value of this column is NULL. * `INDEX_NAME`: The name of the index to which the Region belongs. If `IS_INDEX` is 0, the value of this column is NULL. +* `IS_PARTITION`: Whether the table to which the Region belongs is partitioned. +* `PARTITION_ID`: If the table to which the Region belongs is partitioned, this column displays the ID of the partition to which the Region belongs. +* `PARTITION_NAME`: If the table to which the Region belongs is partitioned, this column displays the name of the partition to which the Region belongs. * `EPOCH_CONF_VER`: The version number of the Region configuration. The version number increases when a peer is added or removed. * `EPOCH_VERSION`: The current version number of the Region. The version number increases when the Region is split or merged. * `WRITTEN_BYTES`: The amount of data (bytes) written to the Region.