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

statistics: compute and store column order correlation with handle #9315

Merged
merged 7 commits into from Feb 27, 2019

Conversation

@eurekaka
Copy link
Contributor

commented Feb 15, 2019

What problem does this PR solve?

First step to fix #9067

What is changed and how it works?

  • compute order correlations between columns and handle column;
  • store this correlation in mysql.stats_histograms, i.e, in a newly added column Correlation;
  • update the upgrade logic and show stats_histograms correspondingly;

Check List

Tests

  • Unit test

Code changes

  • Has persistent data change

Side effects

  • Increased code complexity
  • Breaking backward compatibility: upgrade logic has been addressed in this PR also.

Related changes

N/A

@codecov-io

This comment has been minimized.

Copy link

commented Feb 15, 2019

Codecov Report

❗️ No coverage uploaded for pull request base (master@511a80b). Click here to learn what that means.
The diff coverage is 88.33%.

Impacted file tree graph

@@           Coverage Diff            @@
##             master   #9315   +/-   ##
========================================
  Coverage          ?   67.4%           
========================================
  Files             ?     373           
  Lines             ?   78557           
  Branches          ?       0           
========================================
  Hits              ?   52953           
  Misses            ?   20846           
  Partials          ?    4758
Impacted Files Coverage Δ
executor/builder.go 83.79% <ø> (ø)
executor/analyze.go 63.63% <100%> (ø)
statistics/table.go 83.11% <100%> (ø)
statistics/bootstrap.go 75% <100%> (ø)
executor/show_stats.go 89.78% <100%> (ø)
statistics/histogram.go 81.46% <100%> (ø)
session/bootstrap.go 83.43% <100%> (ø)
planner/core/planbuilder.go 49.02% <20%> (ø)
statistics/sample.go 88.88% <92%> (ø)
statistics/builder.go 89.88% <93.33%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 511a80b...720540b. Read the comment docs.

@eurekaka

This comment has been minimized.

Copy link
Contributor Author

commented Feb 18, 2019

/run-all-tests

@eurekaka

This comment has been minimized.

Copy link
Contributor Author

commented Feb 18, 2019

/run-all-tests tidb-test=pr/740

@eurekaka eurekaka requested review from lamxTyler and zz-jason Feb 18, 2019

@qw4990 qw4990 self-requested a review Feb 22, 2019

@eurekaka

This comment has been minimized.

Copy link
Contributor Author

commented Feb 22, 2019

/run-all-tests tidb-test=pr/740

1 similar comment
@eurekaka

This comment has been minimized.

Copy link
Contributor Author

commented Feb 22, 2019

/run-all-tests tidb-test=pr/740

@eurekaka eurekaka requested a review from lamxTyler Feb 22, 2019

@lamxTyler
Copy link
Member

left a comment

LGTM

@eurekaka eurekaka force-pushed the eurekaka:correlation_stats branch from 6034101 to f4995ce Feb 25, 2019

Show resolved Hide resolved statistics/sample.go Outdated

@eurekaka eurekaka requested a review from qw4990 Feb 26, 2019

@qw4990
Copy link
Contributor

left a comment

LGTM

@qw4990 qw4990 added status/LGT2 and removed status/LGT1 labels Feb 26, 2019

@eurekaka

This comment has been minimized.

Copy link
Contributor Author

commented Feb 26, 2019

Wait for pingcap/tidb-test#740 to be merged together.

zz-jason and others added some commits Feb 27, 2019

@eurekaka eurekaka merged commit 45f9d6a into pingcap:master Feb 27, 2019

4 of 5 checks passed

continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
ci/circleci Your tests passed on CircleCI!
Details
idc-jenkins-ci-tidb/build Jenkins job succeeded.
Details
idc-jenkins-ci-tidb/check_dev Jenkins job succeeded.
Details
license/cla Contributor License Agreement is signed.
Details

@eurekaka eurekaka deleted the eurekaka:correlation_stats branch Feb 27, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.