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: make auto analyze more conservative #4284

Merged
merged 6 commits into from Aug 24, 2017
Merged

Conversation

alivxxx
Copy link
Contributor

@alivxxx alivxxx commented Aug 22, 2017

ctx.GetSessionVars().Systems[variable.TiDBBuildStatsConcurrency] = "1"
ctx.GetSessionVars().DistSQLScanConcurrency = 1
ctx.GetSessionVars().IndexSerialScanConcurrency = 1
ctx.GetSessionVars().Systems[variable.TxnIsolation] = ast.ReadCommitted
Copy link
Member

Choose a reason for hiding this comment

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

Restore the session context after running analyze.

@shenli
Copy link
Member

shenli commented Aug 22, 2017

We should investigate why analyze use so many memory.

@alivxxx
Copy link
Contributor Author

alivxxx commented Aug 23, 2017

@shenli One of the reason is that analyze will open all the sub-executors at begin, but it is not necessary, we need only open those executors when build histograms.

@shenli
Copy link
Member

shenli commented Aug 23, 2017

LGTM
@hanfei1991 PTAL

Copy link
Member

@hanfei1991 hanfei1991 left a comment

Choose a reason for hiding this comment

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

LGTM

@hanfei1991 hanfei1991 merged commit 21a417a into master Aug 24, 2017
@hanfei1991 hanfei1991 deleted the xhb/analyze branch August 24, 2017 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants