Statement Summary Tables
The statement summary tables aggregate information about statement waits:
events_statements_summary_by_thread_by_event_name: Statement events summarized per thread and event nameevents_statements_summary_global_by_event_name: Statement events summarized per event name
For example:
mysql> SELECT * FROM events_statements_summary_global_by_event_name\G
*************************** 1. row ***************************
EVENT_NAME: statement/sql/select
COUNT_STAR: 25
SUM_TIMER_WAIT: 1535983999000
MIN_TIMER_WAIT: 209823000
AVG_TIMER_WAIT: 61439359000
MAX_TIMER_WAIT: 1363397650000
SUM_LOCK_TIME: 20186000000
SUM_ERRORS: 0
SUM_WARNINGS: 0
SUM_ROWS_AFFECTED: 0
SUM_ROWS_SENT: 388
SUM_ROWS_EXAMINED: 370
SUM_CREATED_TMP_DISK_TABLES: 0
SUM_CREATED_TMP_TABLES: 0
SUM_SELECT_FULL_JOIN: 0
SUM_SELECT_FULL_RANGE_JOIN: 0
SUM_SELECT_RANGE: 0
SUM_SELECT_RANGE_CHECK: 0
SUM_SELECT_SCAN: 6
SUM_SORT_MERGE_PASSES: 0
SUM_SORT_RANGE: 0
SUM_SORT_ROWS: 0
SUM_SORT_SCAN: 0
SUM_NO_INDEX_USED: 6
SUM_NO_GOOD_INDEX_USED: 0
...
TRUNCATE TABLE is permitted for summary tables. It resets the counters to zero rather than removing rows.
The statement summary tables have these grouping columns to indicate how events are aggregated:
events_statements_summary_global_by_event_namehas anEVENT_NAMEcolumn. Each row summarizes events for a given instrument.events_statements_summary_by_thread_by_event_namehasTHREAD_IDandEVENT_NAMEcolumns. Each row summarizes events for a given thread instrument instance.
The statement summary tables have these summary columns containing aggregated values:
COUNT_STAR,SUM_TIMER_WAIT,MIN_TIMER_WAIT,AVG_TIMER_WAITMAX_TIMER_WAITThese columns are analogous to the columns of the same names in the
events_waits_summary_global_by_event_nameandevents_waits_summary_by_thread_by_event_nametables, except that the statement summary tables aggregate waits fromevents-statements-currentrather thanevents_waits_current.SUM_xxxThe aggregate of the corresponding
xxxcolumn in theevents_statements_currenttable. For example, theSUM_LOCK_TIMEandSUM_ERRORScolumns in statement summary tables are the aggregates of theLOCK_TIMEandERRORScolumns inevents_statements_currenttable.
These tables were added in MariaDB 5.6.3.