-
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: prioritize low selectivity indexes in ... (#20038) #20154
statistics: prioritize low selectivity indexes in ... (#20038) #20154
Conversation
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
/run-all-tests |
/run-sqllogic-test-2 |
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 |
Your auto merge job has been accepted, waiting for:
|
/run-all-tests |
@ti-srebot merge failed. |
/run-unit-test |
Selectivity()
(#20038)
cherry-pick #20038 to release-4.0
What problem does this PR solve?
Issue Number: close #19904
Problem Summary:
Optimal index is not chosen when computing selectivity.
What is changed and how it works?
What's Changed:
Consider the selectivity of combined conditions in the greedy search procedure to choose the covering indexes.
How it Works:
Different indexes may indicate that different set of conditions are covered, we should prefer the combined conditions with lower selectivity. The rationale behind is that lower selectivity tends to reflect more functional dependencies between columns.
Related changes
Check List
Tests
Side effects
N/A
Release note
Selectivity()