Pre-filtering is done by the Performance Schema and has a global effect that applies to all users. Pre-filtering can be applied to either the producer or consumer stage of event processing:
To configure pre-filtering at the producer stage, several tables can be used:
setup_instrumentsindicates which instruments are available. An instrument disabled in this table produces no events regardless of the contents of the other production-related setup tables. An instrument enabled in this table is permitted to produce events, subject to the contents of the other tables.
setup_objectscontrols whether the Performance Schema monitors particular table objects.
threadsindicates whether monitoring is enabled for each server thread.
setup_actorsdetermines the initial monitoring state for new foreground threads.
To configure pre-filtering at the consumer stage, modify the
setup_consumerstable. This determines the destinations to which events are sent.
setup_consumersalso implicitly affects event production. If a given event is not sent to any destination (is not consumed), the Performance Schema does not produce it.
Modifications to any of these tables affect monitoring immediately, with some exceptions:
Modifications to some instruments in the
setup_instrumentstable 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.
Modifications to the
setup_actorstable affect only foreground threads created subsequent to the modification, not existing threads.
When you change the monitoring configuration, the Performance
Schema does not flush the history tables. Events already
collected remain in the current-events and history tables until
displaced by newer events. If you disable instruments, you might
need to wait a while before events for them are displaced by
newer events of interest. Alternatively, use
TRUNCATE TABLE to empty the
After making instrumentation changes, you might want to truncate
the summary tables. Generally, the effect is to reset the
summary columns to 0 or
NULL, not to remove
rows. This enables you to clear collected values and restart
aggregation. That might be useful, for example, after you have
made a runtime configuration change. Exceptions to this
truncation behavior are noted in individual summary table
The following sections describe how to use specific tables to control Performance Schema pre-filtering.