Rechercher dans le manuel MySQL
26.4.8 Example Consumer Configurations
The consumer settings in the
setup_consumers
table form a
hierarchy from higher levels to lower. The following discussion
describes how consumers work, showing specific configurations
and their effects as consumer settings are enabled progressively
from high to low. The consumer values shown are representative.
The general principles described here apply to other consumer
values that may be available.
The configuration descriptions occur in order of increasing functionality and overhead. If you do not need the information provided by enabling lower-level settings, disable them and the Performance Schema will execute less code on your behalf and you will have less information to sift through.
The setup_consumers
table contains
the following hierarchy of values:
global_instrumentation
thread_instrumentation
events_waits_current
events_waits_history
events_waits_history_long
events_stages_current
events_stages_history
events_stages_history_long
events_statements_current
events_statements_history
events_statements_history_long
events_transactions_current
events_transactions_history
events_transactions_history_long
statements_digest
In the consumer hierarchy, the consumers for waits, stages, statements, and transactions are all at the same level. This differs from the event nesting hierarchy, for which wait events nest within stage events, which nest within statement events, which nest within transaction events.
If a given consumer setting is NO
, the
Performance Schema disables the instrumentation associated with
the consumer and ignores all lower-level settings. If a given
setting is YES
, the Performance Schema
enables the instrumentation associated with it and checks the
settings at the next lowest level. For a description of the
rules for each consumer, see
Section 26.4.7, “Pre-Filtering by Consumer”.
For example, if global_instrumentation
is
enabled, thread_instrumentation
is checked.
If thread_instrumentation
is enabled, the
events_
consumers are checked. If of these
xxx
_currentevents_waits_current
is enabled,
events_waits_history
and
events_waits_history_long
are checked.
Each of the following configuration descriptions indicates which setup elements the Performance Schema checks and which output tables it maintains (that is, for which tables it collects information).
No Instrumentation
Server configuration state:
- +---------------------------+---------+
- | NAME | ENABLED |
- +---------------------------+---------+
- ...
- +---------------------------+---------+
In this configuration, nothing is instrumented.
Setup elements checked:
Table
setup_consumers
, consumerglobal_instrumentation
Output tables maintained:
None
Server configuration state:
- +---------------------------+---------+
- | NAME | ENABLED |
- +---------------------------+---------+
- | global_instrumentation | YES |
- ...
- +---------------------------+---------+
In this configuration, instrumentation is maintained only for global states. Per-thread instrumentation is disabled.
Additional setup elements checked, relative to the preceding configuration:
Table
setup_consumers
, consumerthread_instrumentation
Table
setup_instruments
Table
setup_objects
Additional output tables maintained, relative to the preceding configuration:
Server configuration state:
- +----------------------------------+---------+
- | NAME | ENABLED |
- +----------------------------------+---------+
- | global_instrumentation | YES |
- | thread_instrumentation | YES |
- ...
- ...
- ...
- ...
- +----------------------------------+---------+
In this configuration, instrumentation is maintained globally and per thread. No individual events are collected in the current-events or event-history tables.
Additional setup elements checked, relative to the preceding configuration:
Table
setup_consumers
, consumersevents_
, wherexxx
_currentxxx
iswaits
,stages
,statements
,transactions
Table
setup_actors
Column
threads.instrumented
Additional output tables maintained, relative to the preceding configuration:
events_
, wherexxx
_summary_by_yyy
_by_event_namexxx
iswaits
,stages
,statements
,transactions
; andyyy
isthread
,user
,host
,account
Server configuration state:
- +----------------------------------+---------+
- | NAME | ENABLED |
- +----------------------------------+---------+
- | global_instrumentation | YES |
- | thread_instrumentation | YES |
- | events_waits_current | YES |
- | events_stages_current | YES |
- | events_statements_current | YES |
- | events_transactions_current | YES |
- ...
- +----------------------------------+---------+
In this configuration, instrumentation is maintained globally and per thread. Individual events are collected in the current-events table, but not in the event-history tables.
Additional setup elements checked, relative to the preceding configuration:
Consumers
events_
, wherexxx
_historyxxx
iswaits
,stages
,statements
,transactions
Consumers
events_
, wherexxx
_history_longxxx
iswaits
,stages
,statements
,transactions
Additional output tables maintained, relative to the preceding configuration:
events_
, wherexxx
_currentxxx
iswaits
,stages
,statements
,transactions
The preceding configuration collects no event history because
the
events_
and
xxx
_historyevents_
consumers are disabled. Those consumers can be enabled
separately or together to collect event history per thread,
globally, or both.
xxx
_history_long
This configuration collects event history per thread, but not globally:
- +----------------------------------+---------+
- | NAME | ENABLED |
- +----------------------------------+---------+
- | global_instrumentation | YES |
- | thread_instrumentation | YES |
- | events_waits_current | YES |
- | events_waits_history | YES |
- | events_stages_current | YES |
- | events_stages_history | YES |
- | events_statements_current | YES |
- | events_statements_history | YES |
- | events_transactions_current | YES |
- | events_transactions_history | YES |
- ...
- +----------------------------------+---------+
Event-history tables maintained for this configuration:
events_
, wherexxx
_historyxxx
iswaits
,stages
,statements
,transactions
This configuration collects event history globally, but not per thread:
- +----------------------------------+---------+
- | NAME | ENABLED |
- +----------------------------------+---------+
- | global_instrumentation | YES |
- | thread_instrumentation | YES |
- | events_waits_current | YES |
- | events_waits_history_long | YES |
- | events_stages_current | YES |
- | events_stages_history_long | YES |
- | events_statements_current | YES |
- | events_statements_history_long | YES |
- | events_transactions_current | YES |
- | events_transactions_history_long | YES |
- ...
- +----------------------------------+---------+
Event-history tables maintained for this configuration:
events_
, wherexxx
_history_longxxx
iswaits
,stages
,statements
,transactions
This configuration collects event history per thread and globally:
- +----------------------------------+---------+
- | NAME | ENABLED |
- +----------------------------------+---------+
- | global_instrumentation | YES |
- | thread_instrumentation | YES |
- | events_waits_current | YES |
- | events_waits_history | YES |
- | events_waits_history_long | YES |
- | events_stages_current | YES |
- | events_stages_history | YES |
- | events_stages_history_long | YES |
- | events_statements_current | YES |
- | events_statements_history | YES |
- | events_statements_history_long | YES |
- | events_transactions_current | YES |
- | events_transactions_history | YES |
- | events_transactions_history_long | YES |
- ...
- +----------------------------------+---------+
Event-history tables maintained for this configuration:
events_
, wherexxx
_historyxxx
iswaits
,stages
,statements
,transactions
events_
, wherexxx
_history_longxxx
iswaits
,stages
,statements
,transactions
Nederlandse vertaling
U hebt gevraagd om deze site in het Nederlands te bezoeken. Voor nu wordt alleen de interface vertaald, maar nog niet alle inhoud.Als je me wilt helpen met vertalingen, is je bijdrage welkom. Het enige dat u hoeft te doen, is u op de site registreren en mij een bericht sturen waarin u wordt gevraagd om u toe te voegen aan de groep vertalers, zodat u de gewenste pagina's kunt vertalen. Een link onderaan elke vertaalde pagina geeft aan dat u de vertaler bent en heeft een link naar uw profiel.
Bij voorbaat dank.
Document heeft de 26/06/2006 gemaakt, de laatste keer de 26/10/2018 gewijzigd
Bron van het afgedrukte document:https://www.gaudry.be/nl/mysql-rf-performance-schema-consumer-configurations.html
De infobrol is een persoonlijke site waarvan de inhoud uitsluitend mijn verantwoordelijkheid is. De tekst is beschikbaar onder CreativeCommons-licentie (BY-NC-SA). Meer info op de gebruiksvoorwaarden en de auteur.
Referenties
Deze verwijzingen en links verwijzen naar documenten die geraadpleegd zijn tijdens het schrijven van deze pagina, of die aanvullende informatie kunnen geven, maar de auteurs van deze bronnen kunnen niet verantwoordelijk worden gehouden voor de inhoud van deze pagina.
De auteur Deze site is als enige verantwoordelijk voor de manier waarop de verschillende concepten, en de vrijheden die met de referentiewerken worden genomen, hier worden gepresenteerd. Vergeet niet dat u meerdere broninformatie moet doorgeven om het risico op fouten te verkleinen.