Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.
Original topic: infomation_schema.tables中的行数变成0
【TiDB Usage Environment】Production Environment
【TiDB Version】v6.5.5
I found that the tables in the database were originally normal, but after one night, the number of rows in information_schema.tables became 0. The queries on these tables became very slow, and many execution plans involved full table scans. The health of the tables shows 100. What is the situation here?
After a night, what did you do the night before?
Add nodes, perform regular CRUD operations.
What kind of node did you add? How much data was added, deleted, or modified?
First, perform an analyze.
The information_schema.tables table should not have the permission to be cleared… How about restarting a tidb-server node and logging in through the restarted tidb-server node to check if the table data is still there?
Working on it, the table is too large, the key is to find the cause.
First, check the logs to see if it’s only happening on a specific TiDB server or all of them.
System tables do not store KV?
Can the analysis table be repaired?
Are you performing a region migration?
The table’s metadata has been corrupted, so the database is likely to have difficulty operating normally.
It wouldn’t be the tidb-server node, right?
Delete statistics and re-analyze.
There are no other errors in the logs either.