-
Notifications
You must be signed in to change notification settings - Fork 5.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
statistics: improve estimation for index equal condition (#17366) #17609
statistics: improve estimation for index equal condition (#17366) #17609
Conversation
Signed-off-by: sre-bot <sre-bot@pingcap.com>
/run-all-tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@eurekaka please resolve conflicts and fix CI.
/run-unit-test |
/run-check_dev |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/merge |
/run-all-tests |
cherry-pick #17366 to release-3.0
What problem does this PR solve?
Issue Number: close #17364
Problem Summary:
Wrong plan is chosen when index equal condition contains value which is out of the range of the histogram.
What is changed and how it works?
What's Changed:
Compute the NDV for the prefix columns of the index which are used for equal condition, and use it for row count guess.
How it Works:
It is more reasonable than hard-coded constant
outOfRangeBetweenRate
.Related changes
N/A
Check List
Tests
Side effects
N/A
Release note