planner: incorrect cardinality estimation on composite indexes #49801
Labels
affects-6.5
This bug affects the 6.5.x(LTS) versions.
affects-7.1
This bug affects the 7.1.x(LTS) versions.
affects-7.5
This bug affects the 7.5.x(LTS) versions.
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)
Prepare data by executing those SQLs:
then analyze the table and execute :
If you can't reproduce this issue, just analyze the table again, it has a certain degree of randomness.
2. What did you expect to see? (Required)
The cardinality estimation result should be accurate.
3. What did you see instead (Required)
It is incredibly over-estimated:
It seems like the stats is not collected correctly. The stats_bucket seems incorrect:
4. What is your TiDB version? (Required)
The text was updated successfully, but these errors were encountered: