-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
infoschema: add plan field to the statement summary tables (#14182) #14285
Conversation
/run-all-tests |
/run-all-tests |
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
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
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
cherry-pick #14182 to release-3.0
conflicting files:
statement_summary.go
(undeclared function)tables_test.go
(import error)What problem does this PR solve?
Add plan and plan digest to the statement summary tables.
Same SQLs with different plans are summarized in different records in the tables.
Record the SQL and plan that appear at the first time in each summary, not the last time, to increase performance.
Since same SQL may be split into several records,
max-stmt-count
should increase.What is changed and how it works?
Add
plan_digest
andplan
fields.schema_name
+digest
+prev_sql_digest
+plan_digest
are combined as a key of the summary map.Default value of
max-stmt-count
is increased to 200.Record the SQL and plan that appear at the first time in each summary, not the last time.
Check List
Tests
Code changes
Side effects
Related changes
Release note
plan
andplan_digest
to the statement summary tables.max-stmt-count
in [stmt-summary] to 200.