|
Spec-Zone .ru
спецификации, руководства, описания, API
|
The connection summary tables are similar to the corresponding events_ tables, except that
aggregation occurs per account, user, or host, rather than by thread. xxx_summary_by_thread_by_event_name
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:
events_waits_summary_by_account_by_event_name:
Wait events summarized per account and event name
events_waits_summary_by_user_by_event_name:
Wait events summarized per user name and event name
events_waits_summary_by_host_by_event_name:
Wait events summarized per host name and event name
events_stages_summary_by_account_by_event_name:
Stage events summarized per account and event name
events_stages_summary_by_user_by_event_name:
Stage events summarized per user name and event name
events_stages_summary_by_host_by_event_name:
Stage events summarized per host name and event name
events_statements_summary_by_account_by_event_name:
Statement events summarized per account and event name
events_statements_summary_by_user_by_event_name:
Statement events summarized per user name and event name
events_statements_summary_by_host_by_event_name:
Statement events summarized per host name and event name
In other words, the connection summary tables have names of the form events_,
where xxx_summary_yyy_by_event_namexxx is waits, stages, or statements, and yyy is account, user, or host.
The connection summary tables provide an intermediate aggregation level:
tables are more detailed than connection summary tables xxx_summary_by_thread_by_event_name
tables are less detailed than connection summary tablesxxx_summary_global_by_event_name
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:
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.
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.