Spec-Zone .ru
спецификации, руководства, описания, API

21.9.8.7. 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:

TRUNCATE TABLE is permitted for connection summary tables. It resets the counters 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.1, "Effect of Implicit Table Truncation", describes the relationship between connection table truncation and implicitly truncated tables.

Table 21.1. Effect of Implicit Table Truncation

Truncated Table Implicitly Truncated Summary Tables
accounts Tables with names matching %_by_account%, %_by_thread%
hosts Tables with names matching %_by_account%, %_by_host%, %_by_thread%
users Tables with names matching %_by_account%, %_by_user%,%_by_thread%

The connection summary tables have these grouping columns to indicate how events are aggregated:

The 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.

The connection summary tables were added in MySQL 5.6.3.