-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
*: add binary plan in stmt summary and slow log/query #35698
Conversation
@@ -2318,6 +2322,10 @@ const ( | |||
SlowLogIsWriteCacheTable = "IsWriteCacheTable" | |||
) | |||
|
|||
// GenerateBinaryPlan decides whether we should record binary plan in slow log and stmt summary. | |||
// It's controlled by the global variable `tidb_generate_binary_plan`. | |||
var GenerateBinaryPlan atomic2.Bool |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's a instance scope or cluster scope?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's cluster scope.
It's controlled by the global scope system variable. Once the system variable is updated, the GenerateBinaryPlan
will be updated in all tidb.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 1033132
|
/merge |
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 1a111ff
|
/run-mysql-test |
@time-and-fate: Your PR was out of date, I have automatically updated it for you. At the same time I will also trigger all tests for you: /run-all-tests If the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 0f24af5
|
What problem does this PR solve?
Issue Number: close #35889
What is changed and how it works?
stmtCtx
to cache the binary plan.SlowQueryLogItems
that contains the binary plan.Binary_plan: tidb_decode_binary_plan('xxx')
stmtSummaryByDigestElement
that contains the binary plan.Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.