Skip to content

The calculation of cardinality estimation is wrong in some cases #39593

@Reminiscent

Description

@Reminiscent

Bug Report

Please answer these questions before submitting your issue. Thanks!

We shouldn't scale the totalCount here, we only scale the expBackoffCnt 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.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions