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

infoschema, session: support for events_statements_summary_by_digest #12017 #12306

Merged
merged 1 commit into from
Sep 23, 2019

Conversation

djshow832
Copy link
Contributor

@djshow832 djshow832 commented Sep 23, 2019

cherry-pick #12017 to release-3.0, with little conflict-resolve


What problem does this PR solve?

Support system table events_statements_summary_by_digest, which is used to summary statements by digest.

What is changed and how it works?

  • Add methods to perfSchemaTable, and add a new table events_statements_summary_by_digest.
  • Add a system variable tidb_enable_stmt_summary and add configurations max-stmt-count & max-sql-length.
  • Summary the statement execution information and put it into StmtSummary after a SQL runs.
  • Get information from StmtSummary when the user queries events_statements_summary_by_digest.

Check List

Tests

  • Unit test

Code changes

  • Has exported function/method change
  • Has exported variable/fields change
  • Has interface methods change

Side effects

  • Possible performance regression
  • Increased code complexity

Related changes

  • Need to cherry-pick to the release branch

Release note

  • Support system table performance_schema.events_statements_summary_by_digest. The table is used to summarize statements by digest of statements.

@coocood
Copy link
Member

coocood commented Sep 23, 2019

LGTM

Copy link
Member

@bb7133 bb7133 left a comment

Choose a reason for hiding this comment

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

LGTM

@winkyao winkyao added the status/can-merge Indicates a PR has been approved by a committer. label Sep 23, 2019
@sre-bot
Copy link
Contributor

sre-bot commented Sep 23, 2019

/run-all-tests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants