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

executor, stats: extract topn from cm sketch #11409

Merged
merged 7 commits into from Jul 29, 2019
Merged

Conversation

alivxxx
Copy link
Contributor

@alivxxx alivxxx commented Jul 24, 2019

What problem does this PR solve?

Extract topn from cm sketch for normal analyze to avoid hash collision of frequent values.

What is changed and how it works?

For columns stats, we can build the topn from samples; for index stats, extract the topn from histogram boundaries.

Check List

Tests

  • Unit test

Code changes

  • Has exported function/method change

Side effects

  • None

Related changes

  • None

@codecov
Copy link

codecov bot commented Jul 24, 2019

Codecov Report

Merging #11409 into master will not change coverage.
The diff coverage is n/a.

@@             Coverage Diff             @@
##             master     #11409   +/-   ##
===========================================
  Coverage   81.5217%   81.5217%           
===========================================
  Files           424        424           
  Lines         91578      91578           
===========================================
  Hits          74656      74656           
  Misses        11578      11578           
  Partials       5344       5344

statistics/histogram.go Outdated Show resolved Hide resolved
@alivxxx alivxxx requested a review from winoros July 26, 2019 05:43
statistics/cmsketch.go Show resolved Hide resolved
statistics/cmsketch.go Show resolved Hide resolved
statistics/histogram.go Show resolved Hide resolved
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

@eurekaka eurekaka added the status/LGT1 Indicates that a PR has LGTM 1. label Jul 29, 2019
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

@alivxxx alivxxx added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Jul 29, 2019
@eurekaka
Copy link
Contributor

/run-all-tests

@alivxxx
Copy link
Contributor Author

alivxxx commented Jul 29, 2019

/run-unit-test

@alivxxx
Copy link
Contributor Author

alivxxx commented Jul 29, 2019

/rebuild

@alivxxx alivxxx merged commit 0668cae into pingcap:master Jul 29, 2019
@alivxxx alivxxx deleted the topn branch July 29, 2019 11:05
alivxxx added a commit to alivxxx/tidb that referenced this pull request Nov 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants