Rechercher dans le manuel MySQL
26.12.4 Performance Schema Wait Event Tables
[+/-]
The Performance Schema instruments waits, which are events that take time. Within the event hierarchy, wait events nest within stage events, which nest within statement events, which nest within transaction events.
These tables store wait events:
events_waits_current
: The current wait event for each thread.events_waits_history
: The most recent wait events that have ended per thread.events_waits_history_long
: The most recent wait events that have ended globally (across all threads).
The following sections describe the wait event tables. There are also summary tables that aggregate information about wait events; see Section 26.12.17.1, “Wait Event Summary Tables”.
For more information about the relationship between the three wait event tables, see Section 26.9, “Performance Schema Tables for Current and Historical Events”.
Configuring Wait Event Collection
To control whether to collect wait events, set the state of the relevant instruments and consumers:
The
setup_instruments
table contains instruments with names that begin withwait
. Use these instruments to enable or disable collection of individual wait event classes.The
setup_consumers
table contains consumer values with names corresponding to the current and historical wait event table names. Use these consumers to filter collection of wait events.
Some wait instruments are enabled by default; others are disabled. For example:
- FROM performance_schema.setup_instruments
- +-------------------------------------------------+---------+-------+
- | NAME | ENABLED | TIMED |
- +-------------------------------------------------+---------+-------+
- +-------------------------------------------------+---------+-------+
- FROM performance_schema.setup_instruments
- +----------------------------------------+---------+-------+
- | NAME | ENABLED | TIMED |
- +----------------------------------------+---------+-------+
- +----------------------------------------+---------+-------+
The wait consumers are disabled by default:
- FROM performance_schema.setup_consumers
- +---------------------------+---------+
- | NAME | ENABLED |
- +---------------------------+---------+
- +---------------------------+---------+
To control wait event collection at server startup, use lines
like these in your my.cnf
file:
Enable:
[mysqld] performance-schema-instrument='wait/%=ON' performance-schema-consumer-events-waits-current=ON performance-schema-consumer-events-waits-history=ON performance-schema-consumer-events-waits-history-long=ON
Disable:
[mysqld] performance-schema-instrument='wait/%=OFF' performance-schema-consumer-events-waits-current=OFF performance-schema-consumer-events-waits-history=OFF performance-schema-consumer-events-waits-history-long=OFF
To control wait event collection at runtime, update the
setup_instruments
and
setup_consumers
tables:
Enable:
Disable:
To collect only specific wait events, enable only the corresponding wait instruments. To collect wait events only for specific wait event tables, enable the wait instruments but only the wait consumers corresponding to the desired tables.
For additional information about configuring event collection, see Section 26.3, “Performance Schema Startup Configuration”, and Section 26.4, “Performance Schema Runtime Configuration”.
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-performance-schema-wait-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.