MySQL Blog Archive
For the latest blogs go to
MySQL Statement Digests

Decoupling Statement Digests From Performance Schema

MySQL Statement Digests are a feature originally introduced as part of the MySQL Performance Schema in MySQL 5.6 to aggregate statement statistics based on the normalized statements executed within the server (for additional info, see here).

Statement Digests were previously only available as a part of the MySQL Performance Schema. In other words, they were only available when Performance Schema was enabled in a running MySQL Server. Now, from the MySQL 5.7.4 DMR on, this Statement Digest feature has been made available irrespective of the Performance Schema.

Why This Is Important

This change allows other MySQL Server Components and Plugins to make use of Statement Digests without being dependent on the Performance Schema configuration. One example of this is the new MySQL Query Rewrite plugin (available in the MySQL 5.7.6 DMR).

Some Additional Notes

There is no change in Performance Schema itself and it still works as it did before with regards to statement aggregation and summary information. All we’ve done is move the Statement Digest functionality to the SQL layer so that it can be used for features unrelated to Performance Schema.

The following MySQL Server options and status variables remain valid and unchanged within the Performance Schema context:

We also added a new max_digest_length MySQL Server option in order to provide greater flexibility in the behavior of Statement Digests. For more details on this new option, please see my previous post on the topic.

If you would like some additional details on this work, you can see the Worklog entry here. If you have any questions, please feel free to post them here on the blog post or in a support ticket.

As always, THANK YOU for using MySQL!