What data has TABLE_ID | DB_NAME | TABLE_NAME as null in the TIKV_REGION_STATUS table, and why is sum(APPROXIMATE_SIZE) increasing daily?

This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: TIKV_REGION_STATUS 表中 TABLE_ID | DB_NAME | TABLE_NAME为 null 的是什么数据,sum(APPROXIMATE_SIZE) 每天都在增长

| username: TiDBer_9Srg7cSk

[TiDB Usage Environment] Production Environment
[TiDB Version] 6.1.0
[Encountered Problem: Problem Phenomenon and Impact] What data is represented by null values in TABLE_ID | DB_NAME | TABLE_NAME in the TIKV_REGION_STATUS table? The sum(APPROXIMATE_SIZE) is increasing every day, and according to statistics, it has consumed several hundred GB of space. Can it be reclaimed?

| username: zhanggame1 | Original post link

I saw that there are over 100 null region records in the test environment, and I’m not sure what they are used for.

| username: Billmay表妹 | Original post link

In the TIKV_REGION_STATUS table, the data where TABLE_ID, DB_NAME, and TABLE_NAME are NULL represents some system tables or system regions in TiKV. These regions do not belong to any user table, so the corresponding TABLE_ID, DB_NAME, and TABLE_NAME information cannot be found in the TIKV_REGION_STATUS table.

As for the reason why sum(APPROXIMATE_SIZE) is increasing every day, it might be because the data in TiKV is continuously growing, leading to an increase in the size of the regions. APPROXIMATE_SIZE is an approximate value and not the exact data size, so adjustments need to be made based on the actual situation during practical use.

If you want more detailed information, you can check the monitoring panel in the TiDB Dashboard. In the monitoring panel, you can view detailed information about each region in TiKV, including the size of the regions, read/write traffic, etc. For specific operation methods, you can refer to the relevant sections in the official TiDB documentation [1].

| username: Fly-bird | Original post link


| username: 大飞哥online | Original post link

Check the region health page in the monitoring to see if there are any empty values.
The region range is divided by Key_start and Key_end. If there is no value, it means infinitely small or infinitely large.

| username: 大飞哥online | Original post link

Use tikv-ctl --host xxxx -r region_id to check the cf default region size value.

Change max_merge_region_size, which is 20M by default, to allow merging.
Refer to this link for a similar issue that was resolved: 删除region - TiDB 的问答社区

| username: system | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.