-
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
Enhance access path selection #8593
Labels
Comments
alivxxx
added
type/enhancement
The issue or PR belongs to an enhancement.
sig/planner
SIG: Planner
labels
Dec 6, 2018
Seems it already works now?
You mean the stats may result in a wrong choice? |
@eurekaka Yes, the stats may result in a wrong choice. |
I guess there are many heuristic rules in other database's operators. Could we borrow something? |
Yes, there are some other interesting rules like skyline pruning, we could learn from them. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Feature Request
Is your feature request related to a problem? Please describe:
Suppose there is a table:
create table t(a int, b int, c int, index idx1(b, a), index idx2(a));
;For queries like
select * from t where a = x and b = xx
, the optimizer may choose idx2, but it is a very risky path compares to idx1.Describe the feature you'd like:
If there are multi paths available, and the access conditions of the path
a
could strictly coversb
, then we should never chooseb
as access condition.The text was updated successfully, but these errors were encountered: