calculating topn count in InitStats takes too much time #44404
Labels
affects-5.1
This bug affects 5.1.x versions.
affects-5.2
This bug affects 5.2.x versions.
affects-5.3
This bug affects 5.3.x versions.
affects-5.4
This bug affects 5.4.x versions.
affects-6.1
affects-6.5
component/statistics
severity/major
sig/planner
SIG: Planner
type/bug
The issue is confirmed as a bug.
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
In
InitStats
, we need to callselect sum(count) from mysql.stats_top_n where table_id = xxx and is_index = 0 and hist_id = xxx
for each column, which is time-consuming.2. What did you expect to see? (Required)
3. What did you see instead (Required)
4. What is your TiDB version? (Required)
v6.5
The text was updated successfully, but these errors were encountered: