Rechercher dans le manuel MySQL
26.12.17.2 Stage Summary Tables
The Performance Schema maintains tables for collecting current and recent stage events, and aggregates that information in summary tables. Section 26.12.5, “Performance Schema Stage Event Tables” describes the events on which stage summaries are based. See that discussion for information about the content of stage events, the current and historical stage event tables, and how to control stage event collection, which is disabled by default.
Example stage event summary information:
- FROM performance_schema.events_stages_summary_global_by_event_name\G
- ...
- *************************** 5. row ***************************
- EVENT_NAME: stage/sql/checking permissions
- COUNT_STAR: 57
- SUM_TIMER_WAIT: 26501888880
- MIN_TIMER_WAIT: 7317456
- AVG_TIMER_WAIT: 464945295
- MAX_TIMER_WAIT: 12858936792
- ...
- *************************** 9. row ***************************
- COUNT_STAR: 37
- SUM_TIMER_WAIT: 662606568
- MIN_TIMER_WAIT: 1593864
- AVG_TIMER_WAIT: 17907891
- MAX_TIMER_WAIT: 437977248
- ...
Each stage 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:
events_stages_summary_by_account_by_event_name
hasEVENT_NAME
,USER
, andHOST
columns. Each row summarizes events for a given account (user and host combination) and event name.events_stages_summary_by_host_by_event_name
hasEVENT_NAME
andHOST
columns. Each row summarizes events for a given host and event name.events_stages_summary_by_thread_by_event_name
hasTHREAD_ID
andEVENT_NAME
columns. Each row summarizes events for a given thread and event name.events_stages_summary_by_user_by_event_name
hasEVENT_NAME
andUSER
columns. Each row summarizes events for a given user and event name.events_stages_summary_global_by_event_name
has anEVENT_NAME
column. Each row summarizes events for a given event name.
Each stage summary table has these summary columns containing
aggregated values: COUNT_STAR
,
SUM_TIMER_WAIT
,
MIN_TIMER_WAIT
,
AVG_TIMER_WAIT
, and
MAX_TIMER_WAIT
. These columns are analogous
to the columns of the same names in the wait event summary
tables (see Section 26.12.17.1, “Wait Event Summary Tables”), except
that the stage summary tables aggregate events from
events_stages_current
rather than
events_waits_current
.
The stage summary tables have these indexes:
events_stages_summary_by_account_by_event_name
:Primary key on (
USER
,HOST
,EVENT_NAME
)
events_stages_summary_by_host_by_event_name
:Primary key on (
HOST
,EVENT_NAME
)
events_stages_summary_by_thread_by_event_name
:Primary key on (
THREAD_ID
,EVENT_NAME
)
events_stages_summary_by_user_by_event_name
:Primary key on (
USER
,EVENT_NAME
)
events_stages_summary_global_by_event_name
:Primary key on (
EVENT_NAME
)
TRUNCATE TABLE
is permitted for
stage summary tables. It has these effects:
For summary tables not aggregated by account, host, or user, truncation resets the summary columns to zero rather than removing rows.
For summary tables aggregated by account, host, or user, truncation removes rows for accounts, hosts, or users with no connections, and resets the summary columns to zero for the remaining rows.
In addition, each stage summary table that is aggregated by
account, host, user, or thread is implicitly truncated by
truncation of the connection table on which it depends, or
truncation of
events_stages_summary_global_by_event_name
.
For details, see
Section 26.12.8, “Performance Schema Connection Tables”.
Traduction non disponible
Le manuel MySQL n'est pas encore traduit en français sur l'infobrol. Seule la version anglaise est disponible pour l'instant.
Document créé le 26/06/2006, dernière modification le 26/10/2018
Source du document imprimé : https://www.gaudry.be/mysql-rf-stage-summary-tables.html
L'infobrol est un site personnel dont le contenu n'engage que moi. Le texte est mis à disposition sous licence CreativeCommons(BY-NC-SA). Plus d'info sur les conditions d'utilisation et sur l'auteur.
Références
Ces références et liens indiquent des documents consultés lors de la rédaction de cette page, ou qui peuvent apporter un complément d'information, mais les auteurs de ces sources ne peuvent être tenus responsables du contenu de cette page.
L'auteur de ce site est seul responsable de la manière dont sont présentés ici les différents concepts, et des libertés qui sont prises avec les ouvrages de référence. N'oubliez pas que vous devez croiser les informations de sources multiples afin de diminuer les risques d'erreurs.