Statement by type (INSERT and SELECT) from each host

mysql> SELECT statement, total, total_latency, rows_sent, rows_examined, rows_affected, full_scans FROM sys.host_summary_by_statement_type WHERE host='localhost' ORDER BY total DESC LIMIT 5;+------------+--------+---------------+-----------+---------------+---------------+------------+| statement  | total  | total_latency | rows_sent | rows_examined | rows_affected | full_scans |+------------+--------+---------------+-----------+---------------+---------------+------------+| select     | 208526 | 1.14 d        |  27484761 |     799220003 |             0 |       9265 || Quit       | 199551 | 4.76 s        |         0 |             0 |             0 |          0 || insert     |   9848 | 12.75 m       |         0 |             0 |       5075058 |          0 || Ping       |   4674 | 278.76 ms     |         0 |             0 |             0 |          0 || set_option | 2552 | 634.76 ...

Get MySQL 8 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.