Rechercher dans le manuel MySQL
26.4.7 Pre-Filtering by Consumer
The setup_consumers
table lists the
available consumer types and which are enabled:
- +----------------------------------+---------+
- | NAME | ENABLED |
- +----------------------------------+---------+
- | events_statements_current | YES |
- | events_statements_history | YES |
- | events_transactions_current | YES |
- | events_transactions_history | YES |
- | global_instrumentation | YES |
- | thread_instrumentation | YES |
- | statements_digest | YES |
- +----------------------------------+---------+
Modify the setup_consumers
table to
affect pre-filtering at the consumer stage and determine the
destinations to which events are sent. To enable or disable a
consumer, set its ENABLED
value to
YES
or NO
.
Modifications to the
setup_consumers
table affect
monitoring immediately.
If you disable a consumer, the server does not spend time maintaining destinations for that consumer. For example, if you do not care about historical event information, disable the history consumers:
The consumer settings in the
setup_consumers
table form a
hierarchy from higher levels to lower. The following principles
apply:
Destinations associated with a consumer receive no events unless the Performance Schema checks the consumer and the consumer is enabled.
A consumer is checked only if all consumers it depends on (if any) are enabled.
If a consumer is not checked, or is checked but is disabled, other consumers that depend on it are not checked.
Dependent consumers may have their own dependent consumers.
If an event would not be sent to any destination, the Performance Schema does not produce it.
The following lists describe the available consumer values. For discussion of several representative consumer configurations and their effect on instrumentation, see Section 26.4.8, “Example Consumer Configurations”.
Global and Thread Consumers
global_instrumentation
is the highest level consumer. Ifglobal_instrumentation
isNO
, it disables global instrumentation. All other settings are lower level and are not checked; it does not matter what they are set to. No global or per thread information is maintained and no individual events are collected in the current-events or event-history tables. Ifglobal_instrumentation
isYES
, the Performance Schema maintains information for global states and also checks thethread_instrumentation
consumer.thread_instrumentation
is checked only ifglobal_instrumentation
isYES
. Otherwise, ifthread_instrumentation
isNO
, it disables thread-specific instrumentation and all lower-level settings are ignored. No information is maintained per thread and no individual events are collected in the current-events or event-history tables. Ifthread_instrumentation
isYES
, the Performance Schema maintains thread-specific information and also checksevents_
consumers.xxx
_current
These consumers require both
global_instrumentation
and
thread_instrumentation
to be
YES
or they are not checked. If checked,
they act as follows:
events_waits_current
, ifNO
, disables collection of individual wait events in theevents_waits_current
table. IfYES
, it enables wait event collection and the Performance Schema checks theevents_waits_history
andevents_waits_history_long
consumers.events_waits_history
is not checked ifevent_waits_current
isNO
. Otherwise, anevents_waits_history
value ofNO
orYES
disables or enables collection of wait events in theevents_waits_history
table.events_waits_history_long
is not checked ifevent_waits_current
isNO
. Otherwise, anevents_waits_history_long
value ofNO
orYES
disables or enables collection of wait events in theevents_waits_history_long
table.
These consumers require both
global_instrumentation
and
thread_instrumentation
to be
YES
or they are not checked. If checked,
they act as follows:
events_stages_current
, ifNO
, disables collection of individual stage events in theevents_stages_current
table. IfYES
, it enables stage event collection and the Performance Schema checks theevents_stages_history
andevents_stages_history_long
consumers.events_stages_history
is not checked ifevent_stages_current
isNO
. Otherwise, anevents_stages_history
value ofNO
orYES
disables or enables collection of stage events in theevents_stages_history
table.events_stages_history_long
is not checked ifevent_stages_current
isNO
. Otherwise, anevents_stages_history_long
value ofNO
orYES
disables or enables collection of stage events in theevents_stages_history_long
table.
These consumers require both
global_instrumentation
and
thread_instrumentation
to be
YES
or they are not checked. If checked,
they act as follows:
events_statements_current
, ifNO
, disables collection of individual statement events in theevents_statements_current
table. IfYES
, it enables statement event collection and the Performance Schema checks theevents_statements_history
andevents_statements_history_long
consumers.events_statements_history
is not checked ifevents_statements_current
isNO
. Otherwise, anevents_statements_history
value ofNO
orYES
disables or enables collection of statement events in theevents_statements_history
table.events_statements_history_long
is not checked ifevents_statements_current
isNO
. Otherwise, anevents_statements_history_long
value ofNO
orYES
disables or enables collection of statement events in theevents_statements_history_long
table.
These consumers require both
global_instrumentation
and
thread_instrumentation
to be
YES
or they are not checked. If checked,
they act as follows:
events_transactions_current
, ifNO
, disables collection of individual transaction events in theevents_transactions_current
table. IfYES
, it enables transaction event collection and the Performance Schema checks theevents_transactions_history
andevents_transactions_history_long
consumers.events_transactions_history
is not checked ifevents_transactions_current
isNO
. Otherwise, anevents_transactions_history
value ofNO
orYES
disables or enables collection of transaction events in theevents_transactions_history
table.events_transactions_history_long
is not checked ifevents_transactions_current
isNO
. Otherwise, anevents_transactions_history_long
value ofNO
orYES
disables or enables collection of transaction events in theevents_transactions_history_long
table.
The statements_digest
consumer requires
global_instrumentation
to be
YES
or it is not checked. There is no
dependency on the statement event consumers, so you can obtain
statistics per digest without having to collect statistics in
events_statements_current
, which
is advantageous in terms of overhead. Conversely, you can get
detailed statements in
events_statements_current
without
digests (the DIGEST
and
DIGEST_TEXT
columns will be
NULL
).
For more information about statement digesting, see Section 26.10, “Performance Schema Statement Digests and Sampling”.
Deutsche Übersetzung
Sie haben gebeten, diese Seite auf Deutsch zu besuchen. Momentan ist nur die Oberfläche übersetzt, aber noch nicht der gesamte Inhalt.Wenn Sie mir bei Übersetzungen helfen wollen, ist Ihr Beitrag willkommen. Alles, was Sie tun müssen, ist, sich auf der Website zu registrieren und mir eine Nachricht zu schicken, in der Sie gebeten werden, Sie der Gruppe der Übersetzer hinzuzufügen, die Ihnen die Möglichkeit gibt, die gewünschten Seiten zu übersetzen. Ein Link am Ende jeder übersetzten Seite zeigt an, dass Sie der Übersetzer sind und einen Link zu Ihrem Profil haben.
Vielen Dank im Voraus.
Dokument erstellt 26/06/2006, zuletzt geändert 26/10/2018
Quelle des gedruckten Dokuments:https://www.gaudry.be/de/mysql-rf-performance-schema-consumer-filtering.html
Die Infobro ist eine persönliche Seite, deren Inhalt in meiner alleinigen Verantwortung liegt. Der Text ist unter der CreativeCommons-Lizenz (BY-NC-SA) verfügbar. Weitere Informationen auf die Nutzungsbedingungen und dem Autor.
Referenzen
Diese Verweise und Links verweisen auf Dokumente, die während des Schreibens dieser Seite konsultiert wurden, oder die zusätzliche Informationen liefern können, aber die Autoren dieser Quellen können nicht für den Inhalt dieser Seite verantwortlich gemacht werden.
Der Autor Diese Website ist allein dafür verantwortlich, wie die verschiedenen Konzepte und Freiheiten, die mit den Nachschlagewerken gemacht werden, hier dargestellt werden. Denken Sie daran, dass Sie mehrere Quellinformationen austauschen müssen, um das Risiko von Fehlern zu reduzieren.