Skip to content
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: fix row count estimation for unique composite IndexScan of IndexJoin #14167

Merged
merged 8 commits into from
Dec 25, 2019

Conversation

eurekaka
Copy link
Contributor

What problem does this PR solve?

Fix #14051

What is changed and how it works?

Fix the wrong conditions used in checking maxOneRow.

Check List

Tests

  • Unit test

Code changes

N/A

Side effects

N/A

Related changes

N/A

Release note

  • Write release note for bug-fix or new feature.
    N/A

@eurekaka eurekaka added type/bugfix This PR fixes a bug. sig/planner SIG: Planner labels Dec 20, 2019
@eurekaka eurekaka marked this pull request as ready for review December 23, 2019 07:49
@eurekaka eurekaka requested a review from a team as a code owner December 23, 2019 07:49
@ghost ghost requested review from alivxxx and winoros and removed request for a team December 23, 2019 07:49
Copy link
Member

@winoros winoros left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

lzmhhh123
lzmhhh123 previously approved these changes Dec 23, 2019
Copy link
Contributor

@lzmhhh123 lzmhhh123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lzmhhh123 lzmhhh123 added status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2. labels Dec 23, 2019
@sre-bot
Copy link
Contributor

sre-bot commented Dec 23, 2019

/run-all-tests

@sre-bot
Copy link
Contributor

sre-bot commented Dec 23, 2019

@eurekaka merge failed.

@eurekaka
Copy link
Contributor Author

/run-unit-test

Copy link
Member

@winoros winoros left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, there's some more things we should consider?
Just reviewed the codebase.
I think we need to check when the helper.maxUsedCols is the index's full length. There still be the case that the filters on the last column is not equal condition?

@eurekaka
Copy link
Contributor Author

@winoros OK, thanks.

@eurekaka
Copy link
Contributor Author

/rebuild

Copy link
Member

@winoros winoros left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@eurekaka
Copy link
Contributor Author

/merge

@sre-bot
Copy link
Contributor

sre-bot commented Dec 25, 2019

/run-all-tests

@sre-bot sre-bot merged commit f18abc9 into pingcap:master Dec 25, 2019
@eurekaka eurekaka deleted the tpcds branch December 25, 2019 11:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sig/planner SIG: Planner status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2. type/bugfix This PR fixes a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10% Performance regression on TPCC and 16% on TPCH q10
4 participants