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

change the way of checking auto analyze ratio #24237

Closed
eurekaka opened this issue Apr 23, 2021 · 0 comments · Fixed by #24382
Closed

change the way of checking auto analyze ratio #24237

eurekaka opened this issue Apr 23, 2021 · 0 comments · Fixed by #24382
Assignees
Labels
component/statistics sig/planner SIG: Planner type/enhancement The issue or PR belongs to an enhancement.

Comments

@eurekaka
Copy link
Contributor

Development Task

Currently, we use (modify_count / count) > autoAnalyzeRatio as the check for auto analyze, this may lead to confusing results sometimes.

For example, if the table has 200 rows, then a 200-row insert can trigger auto analyze if the autoAnalyzeRatio is 0.5, while a 67-row delete can trigger it as well. This inconsistency should be confusing.

To solve this problem, we can use (modify_count / hist.TotalRowCount()) > autoAnalyzeRatio as the check instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/statistics sig/planner SIG: Planner type/enhancement The issue or PR belongs to an enhancement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant