-
Notifications
You must be signed in to change notification settings - Fork 6k
Closed
Labels
affects-8.1This bug affects the 8.1.x(LTS) versions.This bug affects the 8.1.x(LTS) versions.affects-8.5This bug affects the 8.5.x(LTS) versions.This bug affects the 8.5.x(LTS) versions.component/statisticsreport/customerCustomers have encountered this bug.Customers have encountered this bug.severity/majorsig/plannerSIG: PlannerSIG: Plannertype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.type/regression
Description
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
- br restore a backup with 10 tables, each table 500k rows.
- all table is analyzed (auto/manual)
- Run below query to get information of the tables.
select table_name, avg_row_length, max_data_length, data_length, table_rows from information_schema.tables where table_schema = 'db500k';
2. What did you expect to see? (Required)
The table information should be accurate.
3. What did you see instead (Required)
The query results not accurate, there is no max_data_length . and some tables has no results.
Also, run the query multple times, result might be different.
mysql> SHOW STATS_META where db_name='db500k';
+---------+-------------+----------------+---------------------+--------------+-----------+---------------------+
| Db_name | Table_name | Partition_name | Update_time | Modify_count | Row_count | Last_analyze_time |
+---------+-------------+----------------+---------------------+--------------+-----------+---------------------+
| db500k | index_Data4 | | 2024-09-02 13:28:24 | 0 | 500000 | 2024-09-02 13:28:24 |
| db500k | index_Data3 | | 2024-09-02 13:28:23 | 0 | 500000 | 2024-09-02 13:28:23 |
| db500k | index_Data1 | | 2024-09-02 13:28:24 | 0 | 500000 | 2024-09-02 13:28:24 |
| db500k | index_Data2 | | 2024-09-02 13:28:23 | 0 | 500000 | 2024-09-02 13:28:23 |
| db500k | index_Data5 | | 2024-09-02 13:28:24 | 0 | 500000 | 2024-09-02 13:28:24 |
| db500k | Data4 | | 2024-09-02 13:30:39 | 0 | 500000 | 2024-09-02 13:30:39 |
| db500k | Data5 | | 2024-09-02 13:30:38 | 0 | 500000 | 2024-09-02 13:30:38 |
| db500k | Data2 | | 2024-09-02 13:30:41 | 0 | 500000 | 2024-09-02 13:30:41 |
| db500k | Data3 | | 2024-09-02 13:30:40 | 0 | 500000 | 2024-09-02 13:30:40 |
| db500k | Data1 | | 2024-09-02 13:30:39 | 0 | 500000 | 2024-09-02 13:30:38 |
+---------+-------------+----------------+---------------------+--------------+-----------+---------------------+
10 rows in set (0.05 sec)
mysql> select table_name, avg_row_length, max_data_length, data_length, table_rows from information_schema.tables where table_schema = 'db500k';
+-------------+----------------+-----------------+-------------+------------+
| table_name | avg_row_length | max_data_length | data_length | table_rows |
+-------------+----------------+-----------------+-------------+------------+
| index_Data4 | 135 | 0 | 67991573 | 500000 |
| index_Data3 | 0 | 0 | 0 | 0 |
| index_Data1 | 0 | 0 | 0 | 0 |
| index_Data2 | 0 | 0 | 0 | 0 |
| index_Data5 | 0 | 0 | 0 | 0 |
| Data4 | 0 | 0 | 0 | 0 |
| Data5 | 0 | 0 | 0 | 0 |
| Data2 | 0 | 0 | 0 | 0 |
| Data3 | 0 | 0 | 0 | 0 |
| Data1 | 0 | 0 | 0 | 0 |
+-------------+----------------+-----------------+-------------+------------+
10 rows in set (0.05 sec)
4. What is your TiDB version? (Required)
Master
Edition: Community
Git Commit Hash: 94666a2
Metadata
Metadata
Assignees
Labels
affects-8.1This bug affects the 8.1.x(LTS) versions.This bug affects the 8.1.x(LTS) versions.affects-8.5This bug affects the 8.5.x(LTS) versions.This bug affects the 8.5.x(LTS) versions.component/statisticsreport/customerCustomers have encountered this bug.Customers have encountered this bug.severity/majorsig/plannerSIG: PlannerSIG: Plannertype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.type/regression