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

*: add metrics for queries using plan cache #6195

Merged
merged 2 commits into from
Apr 1, 2018

Conversation

zz-jason
Copy link
Member

@zz-jason zz-jason commented Mar 30, 2018

add metrics for queries using cached plan:

  • prepare statement
  • select statement

@coocood
Copy link
Member

coocood commented Mar 31, 2018

LGTM

@@ -766,6 +766,7 @@ func (s *session) Execute(ctx context.Context, sql string) (recordSets []ast.Rec
}

if hitCache {
metrics.PlanCacheCounter.WithLabelValues("select").Inc()
Copy link
Member

Choose a reason for hiding this comment

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

So we only enable cache for select statement?

Copy link
Member Author

Choose a reason for hiding this comment

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

yes

Copy link
Member

@ngaut ngaut left a comment

Choose a reason for hiding this comment

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

LGTM

@ngaut ngaut merged commit 365619d into pingcap:master Apr 1, 2018
@zz-jason zz-jason deleted the dev/metrics/plancache branch April 2, 2018 12:28
@zz-jason zz-jason added the status/LGT2 Indicates that a PR has LGTM 2. label Apr 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants