-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
planner: generate index path as candidate when it is a single scan #12022
Conversation
Some unit tests about |
/rebuild |
/rebuild |
Codecov Report
@@ Coverage Diff @@
## master #12022 +/- ##
===============================================
+ Coverage 81.456% 81.5673% +0.1112%
===============================================
Files 448 448
Lines 95945 96280 +335
===============================================
+ Hits 78153 78533 +380
+ Misses 12218 12178 -40
+ Partials 5574 5569 -5 |
All the tests have been fixed. |
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
/run-all-tests |
@francis0407 merge failed. |
/run-common-test tidb-test=pr/884 |
3 similar comments
/run-common-test tidb-test=pr/884 |
/run-common-test tidb-test=pr/884 |
/run-common-test tidb-test=pr/884 |
/run-integration-common-test tidb-test=pr/884 |
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.
@francis0407 please resolve conflicts
…/tidb into improve_skylineprune
/run-common-test |
/run-integration-common-test |
/merge |
/run-all-tests |
What problem does this PR solve?
fix #12021
When we only want to get primary key, we can consider index path if there is no condition on PK. For example:
In this query, we can use
IndexScan
fort1.a
:We can also use a
IndexScan
for this one:More general, we should consider the index path as a candidate when it is a single scan.
What is changed and how it works?
Change the condition that generates index path.
We can use index to generate physical plan if any of the following conditions is satisfied:
Check List
Tests