Skip to Content
MySQL 8 Cookbook
book

MySQL 8 Cookbook

by Karthik Appigatla
January 2018
Intermediate to advanced
446 pages
12h 57m
English
Packt Publishing
Content preview from MySQL 8 Cookbook

Statement analysis

This output is similar to the output of  performance_schema.events_statements_summary_by_digest and pt-query-digest.

The top query by execution count is as follows:

mysql> SELECT * FROM sys.statement_analysis ORDER BY exec_count DESC LIMIT 1\G*************************** 1. row ***************************            query: SELECT `e` . `emp_no` , `salar ... emp_no` WHERE `from_date` = ?                db: employees        full_scan:        exec_count: 159997        err_count: 0       warn_count: 0    total_latency: 1.98 h      max_latency: 661.58 ms      avg_latency: 44.54 ms     lock_latency: 1.28 m        rows_sent: 14400270    rows_sent_avg: 90    rows_examined: 28800540rows_examined_avg: 180    rows_affected: 0rows_affected_avg: 0       tmp_tables: 0  tmp_disk_tables: 0      rows_sorted: 0sort_merge_passes: 0
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

MySQL Cookbook

MySQL Cookbook

Paul DuBois
Advanced MySQL 8

Advanced MySQL 8

Eric Vanier, Birju Shah, Tejaswi Malepati

Publisher Resources

ISBN: 9781788395809Other