Some metrics for DDL Backfill need to be optimized in million tables scenario
- Dominant language
- Go
- Stars
- 40.5k
- Forks
- 6.2k
- PR merge metrics
- PR metrics pending
Description
## Bug Report
Please answer these questions before submitting your issue. Thanks!
### 1. Minimal reproduce step (Required)
In the million tables and many ddl(add index/change column type) scenrio, the tidb_ddl_add_index_total and tidb_ddl_backfill_percentage_progress metrics will record all the table ddl backfill data.
The amount of data is too large, and The Grafana needs to consume a significant amount of resources to display this monitoring, which may even cause the browser to freeze.


### 2. What did you expect to see? (Required)
### 3. What did you see instead (Required)
### 4. What is your TiDB version? (Required)
Release Version: v8.5.0-alpha-299-g56c07d07a7
Edition: Community
Git Commit Hash: 56c07d07a705c163a57c0565370837ca2585bda8
Git Branch: HEAD
UTC Build Time: 2024-12-08 08:54:55
GoVersion: go1.23.4
Race Enabled: false
Check Table Before Drop: false
Store: tikv
Contributor guide
Assessment
This issue has not been assessed yet.