Rechercher dans le manuel MySQL
26.12.17.12 Status Variable Summary Tables
The Performance Schema makes status variable information available in the tables described in Section 26.12.14, “Performance Schema Status Variable Tables”. It also makes aggregated status variable information available in summary tables, described here. Each status variable summary table has one or more grouping columns to indicate how the table aggregates status values:
status_by_account
hasUSER
,HOST
, andVARIABLE_NAME
columns to summarize status variables by account.status_by_host
hasHOST
andVARIABLE_NAME
columns to summarize status variables by the host from which clients connected.status_by_user
hasUSER
andVARIABLE_NAME
columns to summarize status variables by client user name.
Each status variable summary table has this summary column containing aggregated values:
VARIABLE_VALUE
The aggregated status variable value for active and terminated sessions.
The status variable summary tables have these indexes:
-
Primary key on (
USER
,HOST
,VARIABLE_NAME
)
-
Primary key on (
HOST
,VARIABLE_NAME
)
-
Primary key on (
USER
,VARIABLE_NAME
)
The meaning of “account” in these tables is
similar to its meaning in the MySQL grant tables in the
mysql
system database, in the sense that
the term refers to a combination of user and host values. They
differ in that, for grant tables, the host part of an account
can be a pattern, whereas for Performance Schema tables, the
host value is always a specific nonpattern host name.
Account status is collected when sessions terminate. The session status counters are added to the global status counters and the corresponding account status counters. If account statistics are not collected, the session status is added to host and user status, if host and user status are collected.
Account, host, and user statistics are not collected if the
performance_schema_accounts_size
,
performance_schema_hosts_size
,
and
performance_schema_users_size
system variables, respectively, are set to 0.
The Performance Schema supports TRUNCATE
TABLE
for status variable summary tables as follows;
in all cases, status for active sessions is unaffected:
status_by_account
: Aggregates account status from terminated sessions to user and host status, then resets account status.status_by_host
: Resets aggregated host status from terminated sessions.status_by_user
: Resets aggregated user status from terminated sessions.
FLUSH STATUS
adds the session
status from all active sessions to the global status
variables, resets the status of all active sessions, and
resets account, host, and user status values aggregated from
disconnected sessions.
Document created the 26/06/2006, last modified the 26/10/2018
Source of the printed document:https://www.gaudry.be/en/mysql-rf-performance-schema-status-variable-summary-tables.html
The infobrol is a personal site whose content is my sole responsibility. The text is available under CreativeCommons license (BY-NC-SA). More info on the terms of use and the author.
References
These references and links indicate documents consulted during the writing of this page, or which may provide additional information, but the authors of these sources can not be held responsible for the content of this page.
The author This site is solely responsible for the way in which the various concepts, and the freedoms that are taken with the reference works, are presented here. Remember that you must cross multiple source information to reduce the risk of errors.