The tidb cpu usage is high due to the concurrent query of information_schema.tables
Open
component/statistics
sig/planner
type/enhancement
- Dominant language
- Go
- Stars
- 40.5k
- Forks
- 6.2k
- PR merge metrics
- PR metrics pending
Description
## Enhancement
The tidb cpu usage is high due to the concurrent query of information_schema.tables.statscache lock consume many cpu resouce,reference issue:[34398](https://github.com/pingcap/tidb/issues/34398)
Senarios:
3,000 tables 80,000 parition, SQL:
```
SELECT table_name, engine, version, row_format, table_rows
, avg_row_length, data_length, max_data_length, index_length, data_free
, auto_increment, create_time, update_time, check_time, table_collation
, create_options, table_comment
FROM information_schema.tables
WHERE lower(table_schema) = ?
ORDER BY table_name
```
CPU profile:
Contributor guide
Assessment
This issue has not been assessed yet.