Documentation Home
MySQL 5.7 Reference Manual
Related Documentation Download this Manual Excerpts from this Manual Connection Summary Tables

The connection summary tables are similar to the corresponding events_xxx_summary_by_thread_by_event_name tables, except that aggregation occurs per account, user, or host, rather than by thread.

The Performance Schema maintains summary tables that aggregate connection statistics by event name and account, user, or host. Separate groups of tables are available that aggregate wait, stage, and statement events, which results in this set of connection summary tables:

In other words, the connection summary tables have names of the form events_xxx_summary_yyy_by_event_name, where xxx is waits, stages, or statements, and yyy is account, user, or host.

The connection summary tables provide an intermediate aggregation level:

  • xxx_summary_by_thread_by_event_name tables are more detailed than connection summary tables

  • xxx_summary_global_by_event_name tables are less detailed than connection summary tables

Each connection summary table has one or more grouping columns to indicate how the table aggregates events. Event names refer to names of event instruments in the setup_instruments table.

  • For tables with _by_account in the name, the USER, HOST, and EVENT_NAME columns group events per account and event name.

  • For tables with _by_host in the name, the HOST and EVENT_NAME columns group events per host name and event name.

  • For tables with _by_user in the name, the USER and EVENT_NAME columns group events per user name and event name.

All connection summary tables have these summary columns containing aggregated values: COUNT_STAR, SUM_TIMER_WAIT, MIN_TIMER_WAIT, AVG_TIMER_WAIT, and MAX_TIMER_WAIT. These are similar to the columns of the same names in the events_waits_summary_by_instance table. Connection summary tables for statements have additional SUM_xxx columns that aggregate statement types.

TRUNCATE TABLE is permitted for connection summary tables. It resets the summary columns to zero rather than removing rows. In addition, connection summary tables are implicitly truncated if a connection table on which they depend is truncated. Table 21.2, “Effect of Implicit Table Truncation”, describes the relationship between connection table truncation and implicitly truncated tables.

Table 21.2 Effect of Implicit Table Truncation

Truncated TableImplicitly Truncated Summary Tables
accountsTables with names matching %_by_account%, %_by_thread%
hostsTables with names matching %_by_account%, %_by_host%, %_by_thread%
usersTables with names matching %_by_account%, %_by_user%, %_by_thread%

Download this Manual
User Comments
Sign Up Login You must be logged in to post a comment.