PDF (A4) - 35.2Mb
Man Pages (TGZ) - 256.4Kb
Man Pages (Zip) - 361.2Kb
Info (Gzip) - 3.4Mb
Info (Zip) - 3.4Mb
MySQL Globalization
MySQL Information Schema
MySQL Installation Guide
MySQL and Linux/Unix
MySQL and macOS
MySQL Partitioning
MySQL Performance Schema
MySQL Replication
Using the MySQL Yum Repository
MySQL Restrictions and Limitations
Security in MySQL
MySQL and Solaris
Building MySQL from Source
Starting and Stopping MySQL
MySQL Tutorial
MySQL and Windows
MySQL NDB Cluster 7.5
Thesetup_consumers table lists the available consumer types and which are enabled:
mysql> SELECT * FROM performance_schema.setup_consumers;+----------------------------------+---------+| NAME | ENABLED |+----------------------------------+---------+| events_stages_current | NO || events_stages_history | NO || events_stages_history_long | NO || events_statements_current | YES || events_statements_history | YES || events_statements_history_long | NO || events_transactions_current | NO || events_transactions_history | NO || events_transactions_history_long | NO || events_waits_current | NO || events_waits_history | NO || events_waits_history_long | NO || global_instrumentation | YES || thread_instrumentation | YES || statements_digest | YES |+----------------------------------+---------+ Modify thesetup_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 itsENABLED value toYES orNO.
Modifications to thesetup_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:
UPDATE performance_schema.setup_consumersSET ENABLED = 'NO'WHERE NAME LIKE '%history%'; The consumer settings in thesetup_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, seeSection 25.4.8, “Example Consumer Configurations”.
global_instrumentationis the highest level consumer. Ifglobal_instrumentationisNO, 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_instrumentationisYES, the Performance Schema maintains information for global states and also checks thethread_instrumentationconsumer.thread_instrumentationis checked only ifglobal_instrumentationisYES. Otherwise, ifthread_instrumentationisNO, 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_instrumentationisYES, the Performance Schema maintains thread-specific information and also checksevents_consumers.xxx_current
These consumers require bothglobal_instrumentation andthread_instrumentation to beYES or they are not checked. If checked, they act as follows:
events_waits_current, ifNO, disables collection of individual wait events in theevents_waits_currenttable. IfYES, it enables wait event collection and the Performance Schema checks theevents_waits_historyandevents_waits_history_longconsumers.events_waits_historyis not checked ifevent_waits_currentisNO. Otherwise, anevents_waits_historyvalue ofNOorYESdisables or enables collection of wait events in theevents_waits_historytable.events_waits_history_longis not checked ifevent_waits_currentisNO. Otherwise, anevents_waits_history_longvalue ofNOorYESdisables or enables collection of wait events in theevents_waits_history_longtable.
These consumers require bothglobal_instrumentation andthread_instrumentation to beYES or they are not checked. If checked, they act as follows:
events_stages_current, ifNO, disables collection of individual stage events in theevents_stages_currenttable. IfYES, it enables stage event collection and the Performance Schema checks theevents_stages_historyandevents_stages_history_longconsumers.events_stages_historyis not checked ifevent_stages_currentisNO. Otherwise, anevents_stages_historyvalue ofNOorYESdisables or enables collection of stage events in theevents_stages_historytable.events_stages_history_longis not checked ifevent_stages_currentisNO. Otherwise, anevents_stages_history_longvalue ofNOorYESdisables or enables collection of stage events in theevents_stages_history_longtable.
These consumers require bothglobal_instrumentation andthread_instrumentation to beYES or they are not checked. If checked, they act as follows:
events_statements_current, ifNO, disables collection of individual statement events in theevents_statements_currenttable. IfYES, it enables statement event collection and the Performance Schema checks theevents_statements_historyandevents_statements_history_longconsumers.events_statements_historyis not checked ifevents_statements_currentisNO. Otherwise, anevents_statements_historyvalue ofNOorYESdisables or enables collection of statement events in theevents_statements_historytable.events_statements_history_longis not checked ifevents_statements_currentisNO. Otherwise, anevents_statements_history_longvalue ofNOorYESdisables or enables collection of statement events in theevents_statements_history_longtable.
These consumers require bothglobal_instrumentation andthread_instrumentation to beYES or they are not checked. If checked, they act as follows:
events_transactions_current, ifNO, disables collection of individual transaction events in theevents_transactions_currenttable. IfYES, it enables transaction event collection and the Performance Schema checks theevents_transactions_historyandevents_transactions_history_longconsumers.events_transactions_historyis not checked ifevents_transactions_currentisNO. Otherwise, anevents_transactions_historyvalue ofNOorYESdisables or enables collection of transaction events in theevents_transactions_historytable.events_transactions_history_longis not checked ifevents_transactions_currentisNO. Otherwise, anevents_transactions_history_longvalue ofNOorYESdisables or enables collection of transaction events in theevents_transactions_history_longtable.
Thestatements_digest consumer requiresglobal_instrumentation to beYES 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 inevents_statements_current, which is advantageous in terms of overhead. Conversely, you can get detailed statements inevents_statements_current without digests (theDIGEST andDIGEST_TEXT columns areNULL).
For more information about statement digesting, seeSection 25.10, “Performance Schema Statement Digests”.
PDF (A4) - 35.2Mb
Man Pages (TGZ) - 256.4Kb
Man Pages (Zip) - 361.2Kb
Info (Gzip) - 3.4Mb
Info (Zip) - 3.4Mb
MySQL Globalization
MySQL Information Schema
MySQL Installation Guide
MySQL and Linux/Unix
MySQL and macOS
MySQL Partitioning
MySQL Performance Schema
MySQL Replication
Using the MySQL Yum Repository
MySQL Restrictions and Limitations
Security in MySQL
MySQL and Solaris
Building MySQL from Source
Starting and Stopping MySQL
MySQL Tutorial
MySQL and Windows
MySQL NDB Cluster 7.5