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

stats: specially handle unqiue key when estimate #13354

Merged
merged 7 commits into from
Nov 11, 2019

Conversation

alivxxx
Copy link
Contributor

@alivxxx alivxxx commented Nov 11, 2019

What problem does this PR solve?

When there are equal conditions on unique key, the estimation result should not greater than 1.

What is changed and how it works?

Take the unique info into consideration when we estimate equal conditions for indices and primary key.

Check List

Tests

  • Unit test

Code changes

  • Has exported function/method change

Side effects

  • None

Related changes

  • None

Release note

  • Fix estimation for equal conditions on unique keys

@CLAassistant
Copy link

CLAassistant commented Nov 11, 2019

CLA assistant check
All committers have signed the CLA.

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

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

eurekaka
eurekaka previously approved these changes Nov 11, 2019
Copy link
Contributor

@eurekaka eurekaka left a comment

Choose a reason for hiding this comment

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

LGTM

@codecov
Copy link

codecov bot commented Nov 11, 2019

Codecov Report

Merging #13354 into master will decrease coverage by 1.368%.
The diff coverage is n/a.

@@               Coverage Diff                @@
##             master     #13354        +/-   ##
================================================
- Coverage   81.8792%   80.5111%   -1.3681%     
================================================
  Files           469        469                
  Lines        200273     114517     -85756     
================================================
- Hits         163982      92199     -71783     
+ Misses        24739      15340      -9399     
+ Partials      11552       6978      -4574

@lzmhhh123 lzmhhh123 added the status/can-merge Indicates a PR has been approved by a committer. label Nov 11, 2019
@sre-bot
Copy link
Contributor

sre-bot commented Nov 11, 2019

Your auto merge job has been accepted, waiting for 13294, 13323

@sre-bot
Copy link
Contributor

sre-bot commented Nov 11, 2019

/run-all-tests

@sykp241095
Copy link
Member

/rebuild

@sykp241095
Copy link
Member

/run-all-tests

@alivxxx
Copy link
Contributor Author

alivxxx commented Nov 11, 2019

/merge

@sre-bot
Copy link
Contributor

sre-bot commented Nov 11, 2019

Your auto merge job has been accepted, waiting for 13360, 12996

@sre-bot
Copy link
Contributor

sre-bot commented Nov 11, 2019

/run-all-tests

@sre-bot sre-bot merged commit 5069939 into pingcap:master Nov 11, 2019
@sre-bot
Copy link
Contributor

sre-bot commented Nov 11, 2019

cherry pick to release-2.1 failed

@sre-bot
Copy link
Contributor

sre-bot commented Nov 11, 2019

cherry pick to release-3.1 failed

@sre-bot
Copy link
Contributor

sre-bot commented Nov 11, 2019

cherry pick to release-3.0 failed

@alivxxx alivxxx deleted the stats-unqiue branch November 11, 2019 11:14
alivxxx added a commit to alivxxx/tidb that referenced this pull request Nov 12, 2019
alivxxx added a commit to alivxxx/tidb that referenced this pull request Nov 12, 2019
alivxxx added a commit to alivxxx/tidb that referenced this pull request Nov 12, 2019
XiaTianliang pushed a commit to XiaTianliang/tidb that referenced this pull request Dec 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/statistics status/can-merge Indicates a PR has been approved by a committer. type/enhancement The issue or PR belongs to an enhancement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants