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: enhance index join for more scenarios #10540

Merged
merged 6 commits into from
May 22, 2019

Conversation

winoros
Copy link
Member

@winoros winoros commented May 20, 2019

What problem does this PR solve?

Let more scenarios can choose index join.
Mainly to speed up some heavy query in TPC-C under current arch.

What is changed and how it works?

If some cases satisfy following property, we'll let it have a a try on index join:

  • It looks like a cartesian join(no join key)
  • But the filters pushed down contain eq/in filters on index
  • Also, there're correlated conditions can be used.

Check List

Tests

  • Unit test
  • Maybe add explain test of TPC-C in future.

Code changes

  • Has interface methods change

Side effects

  • Increased code complexity

@winoros winoros added type/enhancement The issue or PR belongs to an enhancement. sig/planner SIG: Planner labels May 20, 2019
@codecov
Copy link

codecov bot commented May 20, 2019

Codecov Report

Merging #10540 into master will decrease coverage by 0.0324%.
The diff coverage is 100%.

@@               Coverage Diff                @@
##             master     #10540        +/-   ##
================================================
- Coverage   77.3197%   77.2872%   -0.0325%     
================================================
  Files           413        413                
  Lines         87327      86982       -345     
================================================
- Hits          67521      67226       -295     
+ Misses        14609      14594        -15     
+ Partials       5197       5162        -35

@winoros
Copy link
Member Author

winoros commented May 20, 2019

/run-all-tests

@winoros
Copy link
Member Author

winoros commented May 22, 2019

/rebuild

1 similar comment
@mahjonp
Copy link
Contributor

mahjonp commented May 22, 2019

/rebuild

Copy link
Contributor

@alivxxx alivxxx left a comment

Choose a reason for hiding this comment

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

LGTM

@alivxxx alivxxx added the status/LGT1 Indicates that a PR has LGTM 1. label May 22, 2019
Copy link
Member

@zz-jason zz-jason left a comment

Choose a reason for hiding this comment

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

LGTM

@zz-jason zz-jason added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels May 22, 2019
@zz-jason
Copy link
Member

/run-all-tests

@winoros
Copy link
Member Author

winoros commented May 22, 2019

/run-integration-common-test

@zz-jason zz-jason merged commit 1cdd80e into pingcap:master May 22, 2019
@winoros winoros deleted the index-join-enhancement branch May 27, 2019 07:18
db-storage pushed a commit to db-storage/tidb that referenced this pull request May 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sig/planner SIG: Planner status/LGT2 Indicates that a PR has LGTM 2. type/enhancement The issue or PR belongs to an enhancement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants