Summary tables provide aggregate information for terminated events over time. The tables in this group summarize event data in different ways.
This group contains tables with names that match the pattern
'%summary%'
:
mysql>SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES
->WHERE TABLE_SCHEMA = 'performance_schema'
->AND TABLE_NAME LIKE '%summary%';
+----------------------------------------------+ | TABLE_NAME | +----------------------------------------------+ | events_waits_summary_by_instance | | events_waits_summary_by_thread_by_event_name | | events_waits_summary_global_by_event_name | | file_summary_by_event_name | | file_summary_by_instance | +----------------------------------------------+
The events_waits_summary_global_by_event_name
table was named
EVENTS_WAITS_SUMMARY_BY_EVENT_NAME
before
MySQL 5.5.7.
Each summary table contains columns to hold aggregated information, and columns that show the groupings for which the aggregated values were computed. Tables that summarize events in similar ways have similar sets of columns, differing only in the columns that show what the groupings are.
Summary tables can be truncated with
TRUNCATE TABLE
. The effect is to
reset the summary columns to 0 or NULL
, not
to remove rows. This enables you to clear collected values and
restart aggregation. That might be useful, for example, after
you have made a runtime configuration change.
events_waits_summary_by_
tables have these columns in common:
xxx
COUNT_STAR
The number of summarized events. This value includes all events, whether timed or not.
SUM_TIMER_WAIT
The total wait time of the summarized timed events. This value is calculated only for timed events because nontimed events have a wait time of
NULL
. The same is true for the other
values.xxx
_TIMER_WAITMIN_TIMER_WAIT
The minimum wait time of the summarized timed events.
AVG_TIMER_WAIT
The average wait time of the summarized timed events.
MAX_TIMER_WAIT
The maximum wait time of the summarized timed events.
The remaining columns in the
events_waits_summary_by_
tables indicate how events were aggregated:
xxx
events_waits_summary_global_by_event_name
has anEVENT_NAME
column. Each row summarizes events for a given instrument. An instrument might be used to create multiple instances of the instrumented object. For example, if there is an instrument for a mutex that is created for each connection, there are as many instances as there are connections. The summary row for the instrument summarizes over all these instances.events_waits_summary_by_instance
hasEVENT_NAME
andOBJECT_INSTANCE_BEGIN
columns. Each row summarizes events for a given instrument instance. If an instrument is used to create multiple instances, each instance has a uniqueOBJECT_INSTANCE_BEGIN
value, so these instances are summarized separately in this table.events_waits_summary_by_thread_by_event_name
hasTHREAD_ID
andEVENT_NAME
columns. Each row summarizes events for a given thread and instrument.
file_summary_by_
tables have these columns in common:
xxx
COUNT_READ
The number of read operations in the summarized events.
COUNT_WRITE
The number of write operations in the summarized events.
SUM_NUMBER_OF_BYTES_READ
The number of bytes read in the summarized events.
SUM_NUMBER_OF_BYTES_WRITE
The number of bytes written in the summarized events.
The remaining columns in the
file_summary_by_
tables indicate how events were aggregated:
xxx
file_summary_by_event_name
has anEVENT_NAME
column. Each row summarizes events for a given instrument.file_summary_by_instance
hasFILE_NAME
andEVENT_NAME
columns. Each row summarizes events for a given file.
Example:
mysql> SELECT * FROM events_waits_summary_global_by_event_name\G
...
*************************** 6. row ***************************
EVENT_NAME: wait/synch/mutex/sql/MYSQL_BIN_LOG::LOCK_index
COUNT_STAR: 8
SUM_TIMER_WAIT: 2119302
MIN_TIMER_WAIT: 196092
AVG_TIMER_WAIT: 264912
MAX_TIMER_WAIT: 569421
...
*************************** 9. row ***************************
EVENT_NAME: wait/synch/mutex/sql/hash_filo::lock
COUNT_STAR: 69
SUM_TIMER_WAIT: 16848828
MIN_TIMER_WAIT: 0
AVG_TIMER_WAIT: 244185
MAX_TIMER_WAIT: 735345
...