Rechercher dans le manuel MySQL
26.4.4 Pre-Filtering by Instrument
The setup_instruments
table lists
the available instruments:
- FROM performance_schema.setup_instruments;
- +---------------------------------------------------+---------+-------+
- | NAME | ENABLED | TIMED |
- +---------------------------------------------------+---------+-------+
- ...
- ...
- | statement/sql/flush | YES | YES |
- ...
- | wait/synch/mutex/sql/LOCK_global_read_lock | YES | YES |
- | wait/synch/mutex/sql/LOCK_global_system_variables | YES | YES |
- | wait/synch/mutex/sql/LOCK_lock_db | YES | YES |
- | wait/synch/mutex/sql/LOCK_manager | YES | YES |
- ...
- | wait/synch/rwlock/sql/LOCK_grant | YES | YES |
- | wait/synch/rwlock/sql/LOGGER::LOCK_logger | YES | YES |
- | wait/synch/rwlock/sql/LOCK_sys_init_connect | YES | YES |
- | wait/synch/rwlock/sql/LOCK_sys_init_slave | YES | YES |
- ...
- | wait/io/file/sql/binlog | YES | YES |
- | wait/io/file/sql/binlog_index | YES | YES |
- | wait/io/file/sql/casetest | YES | YES |
- | wait/io/file/sql/dbopt | YES | YES |
- ...
To control whether an instrument is enabled, set its
ENABLED
column to YES
or
NO
. To configure whether to collect timing
information for an enabled instrument, set its
TIMED
value to YES
or
NO
. Setting the TIMED
column affects Performance Schema table contents as described in
Section 26.4.1, “Performance Schema Event Timing”.
Modifications to most
setup_instruments
rows affect
monitoring immediately. For some instruments, modifications are
effective only at server startup; changing them at runtime has
no effect. This affects primarily mutexes, conditions, and
rwlocks in the server, although there may be other instruments
for which this is true.
The setup_instruments
table
provides the most basic form of control over event production.
To further refine event production based on the type of object
or thread being monitored, other tables may be used as described
in Section 26.4.3, “Event Pre-Filtering”.
The following examples demonstrate possible operations on the
setup_instruments
table. These
changes, like other pre-filtering operations, affect all users.
Some of these queries use the LIKE
operator and a pattern match instrument names. For additional
information about specifying patterns to select instruments, see
Section 26.4.9, “Naming Instruments or Consumers for Filtering Operations”.
Disable all instruments:
Now no events will be collected.
Disable all file instruments, adding them to the current set of disabled instruments:
Disable only file instruments, enable all other instruments:
Enable all but those instruments in the
mysys
library:Disable a specific instrument:
To toggle the state of an instrument, “flip” its
ENABLED
value:Disable timing for all events:
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-instrument-filtering.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.