Inconsistent row count estimation between lite stats init and non-lite init when table has no stats #52426
Labels
affects-8.1
This bug affects the 8.1.x(LTS) versions.
severity/moderate
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)
create a small table and insert some rows
Wait for a while after the stats delta is updated.
Then run
explain select * from t where a in (1, 2, 3, 4, 5, 6,7,8)
with and without settinglite-init-stats
in config to false(default is true).2. What did you expect to see? (Required)
Estimation is the same, both is
0.08
while the full scan is10
. (0.08 = 10 * 1/1000 * 8)3. What did you see instead (Required)
The lite init got
8 = 10 * 0.8(defaultSelectivityFactor)
4. What is your TiDB version? (Required)
current master.
The text was updated successfully, but these errors were encountered: