The calculation of cardinality estimation is wrong in some cases #39593
Labels
affects-5.0
This bug affects 5.0.x versions.
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 the 5.4.x(LTS) versions.
affects-6.0
affects-6.1
This bug affects the 6.1.x(LTS) versions.
affects-6.2
affects-6.3
affects-6.4
affects-6.5
This bug affects the 6.5.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!
We shouldn't scale the
totalCount
here, we only scale theexpBackoffCnt
here.You can reproduce it through
create tablet t(id int, a int, b int, primary key(a, b) nonclustered);
select * from t where id in (..); // Here the number of
in
expression should be as much as possible.And the
modifyCount != 0
.You can run the above SQL and check the estimate row count of the dataSource operator which use the index.
The text was updated successfully, but these errors were encountered: