-
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
planner, sessionctx : Add 'last_plan_from_binding' to help know whether sql's plan is matched with the hints in the binding #18017
Conversation
…whether sql's plan is matched with the hints in the binding
…ents_statements_summary_by_digest'
@lawyerphx @eurekaka PTAL |
Codecov Report
@@ Coverage Diff @@
## master #18017 +/- ##
===========================================
Coverage 79.5721% 79.5721%
===========================================
Files 526 526
Lines 143725 143725
===========================================
Hits 114365 114365
Misses 20175 20175
Partials 9185 9185 |
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.
rest LGTM
@lawyerphx @eurekaka PTAL |
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
/rebuild |
infoschema/perfschema/const.go
Outdated
@@ -415,6 +415,7 @@ const tableEventsStatementsSummaryByDigest = "CREATE TABLE if not exists perform | |||
"LAST_SEEN timestamp(6) NOT NULL DEFAULT '0000-00-00 00:00:00.000000'," + | |||
"PLAN_IN_CACHE bool NOT NULL," + | |||
"PLAN_CACHE_HITS bigint unsigned NOT NULL," + | |||
"PLAN_IN_SPM bool NOT NULL," + |
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.
"PLAN_IN_SPM bool NOT NULL," + | |
"PLAN_IN_BINDING bool NOT NULL," + |
� Conflicts: � sessionctx/variable/varsutil.go
@zz-jason Change all |
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
@crazycs520 I suppose this change would not break slow query stuffs, please help confirm this. |
/run-all-tests |
1 similar comment
/run-all-tests |
/merge |
/run-all-tests |
@Reminiscent merge failed. |
/merge |
/run-all-tests |
/label needs-cherry-pick-4.0 |
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
cherry pick to release-4.0 in PR #21430 |
What problem does this PR solve?
Issue Number: close #16425
Problem Summary:
Add
last_plan_from_binding
to help know whether sql's plan is matched with the hints in the bindingWhat is changed and how it works?
What's Changed:
last_plan_from_binding
to help decide whether the plan cache got hit.last_plan_from_binding
in slow log and statement summary tableCheck List
Related changes
PR to update
pingcap/docs/pingcap/docs-cn
Unit test
Integration test
Release note