The setup_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_cpu            | NO      |
| events_statements_current        | YES     |
| events_statements_history        | YES     |
| events_statements_history_long   | NO      |
| events_transactions_current      | YES     |
| events_transactions_history      | YES     |
| 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 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:
UPDATE performance_schema.setup_consumers
SET ENABLED = 'NO'
WHERE NAME LIKE '%history%';
        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 29.4.8, “Example Consumer Configurations”.
- global_instrumentationis the highest level consumer. If- global_instrumentationis- NO, 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. If- global_instrumentationis- YES, the Performance Schema maintains information for global states and also checks the- thread_instrumentationconsumer.
- thread_instrumentationis checked only if- global_instrumentationis- YES. Otherwise, if- thread_instrumentationis- NO, 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. If- thread_instrumentationis- YES, the Performance Schema maintains thread-specific information and also checks- events_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, if- NO, disables collection of individual wait events in the- events_waits_currenttable. If- YES, it enables wait event collection and the Performance Schema checks the- events_waits_historyand- events_waits_history_longconsumers.
- events_waits_historyis not checked if- event_waits_currentis- NO. Otherwise, an- events_waits_historyvalue of- NOor- YESdisables or enables collection of wait events in the- events_waits_historytable.
- events_waits_history_longis not checked if- event_waits_currentis- NO. Otherwise, an- events_waits_history_longvalue of- NOor- YESdisables or enables collection of wait events in the- events_waits_history_longtable.
          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, if- NO, disables collection of individual stage events in the- events_stages_currenttable. If- YES, it enables stage event collection and the Performance Schema checks the- events_stages_historyand- events_stages_history_longconsumers.
- events_stages_historyis not checked if- event_stages_currentis- NO. Otherwise, an- events_stages_historyvalue of- NOor- YESdisables or enables collection of stage events in the- events_stages_historytable.
- events_stages_history_longis not checked if- event_stages_currentis- NO. Otherwise, an- events_stages_history_longvalue of- NOor- YESdisables or enables collection of stage events in the- events_stages_history_longtable.
          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_cpu, if- NO, disables measurement of- CPU_TIME. If- YES, and the instrumentation is enabled and timed,- CPU_TIMEis measured.
- events_statements_current, if- NO, disables collection of individual statement events in the- events_statements_currenttable. If- YES, it enables statement event collection and the Performance Schema checks the- events_statements_historyand- events_statements_history_longconsumers.
- events_statements_historyis not checked if- events_statements_currentis- NO. Otherwise, an- events_statements_historyvalue of- NOor- YESdisables or enables collection of statement events in the- events_statements_historytable.
- events_statements_history_longis not checked if- events_statements_currentis- NO. Otherwise, an- events_statements_history_longvalue of- NOor- YESdisables or enables collection of statement events in the- events_statements_history_longtable.
          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, if- NO, disables collection of individual transaction events in the- events_transactions_currenttable. If- YES, it enables transaction event collection and the Performance Schema checks the- events_transactions_historyand- events_transactions_history_longconsumers.
- events_transactions_historyis not checked if- events_transactions_currentis- NO. Otherwise, an- events_transactions_historyvalue of- NOor- YESdisables or enables collection of transaction events in the- events_transactions_historytable.
- events_transactions_history_longis not checked if- events_transactions_currentis- NO. Otherwise, an- events_transactions_history_longvalue of- NOor- YESdisables or enables collection of transaction events in the- events_transactions_history_longtable.
          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 are
          NULL in this case).
        
For more information about statement digesting, see Section 29.10, “Performance Schema Statement Digests and Sampling”.