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: fix auto analyze trigger condition #7550

Merged
merged 2 commits into from
Aug 30, 2018
Merged

Conversation

alivxxx
Copy link
Contributor

@alivxxx alivxxx commented Aug 30, 2018

What problem does this PR solve?

The auto analyze work keeps on analyzing the same table even if there is no data change.

What is changed and how it works?

It is caused by the wrong auto analyze trigger condition. We cannot use the histogram bucket count to decide if the column is analyzed or not, because we may not load the histogram from storage. But we can use the count of rows at the time of analyzing to check it.

Check List

Tests

  • Unit test

Code changes

  • Has exported function/method change

Side effects

  • None

Related changes

  • Need to cherry-pick to the release branch

PTAL @coocood @zz-jason @winoros

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

@coocood
Copy link
Member

coocood commented Aug 30, 2018

LGTM

@coocood coocood added type/bugfix This PR fixes a bug. status/LGT2 Indicates that a PR has LGTM 2. labels Aug 30, 2018
@coocood
Copy link
Member

coocood commented Aug 30, 2018

/run-all-tests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

4 participants