tidb
tidb copied to clipboard
`RecordHistoricalStatsToStorage` used too much memory
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
2. What did you expect to see? (Required)
3. What did you see instead (Required)
4. What is your TiDB version? (Required)
v7.5.0
Now, Historical stats have some design problems. it needs to load all stats into the memory. it is easy to lead the OOM by recording the historical stats of partition tables or wide tables. so we need to refactor it as soon as possible.
this is issue is observed again.
this is issue is observed again.
Now, we has disable the tidb_enable_historical_stats by default. We need to refactor this code in v9.