The setup tables provide information about the current
        instrumentation and enable the monitoring configuration to be
        changed. For this reason, some columns in these tables can be
        changed if you have the UPDATE
        privilege.
      
The use of tables rather than individual variables for setup information provides a high degree of flexibility in modifying Performance Schema configuration. For example, you can use a single statement with standard SQL syntax to make multiple simultaneous configuration changes.
        This group contains tables with names that match the pattern
        'SETUP%':
      
mysql>SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES->WHERE TABLE_SCHEMA = 'performance_schema'->AND TABLE_NAME LIKE 'SETUP%';+-------------------+ | TABLE_NAME | +-------------------+ | SETUP_CONSUMERS | | SETUP_INSTRUMENTS | | SETUP_OBJECTS | | SETUP_TIMERS | +-------------------+
        The SETUP_CONSUMERS table lists destination
        tables for event information:
      
mysql> SELECT * FROM SETUP_CONSUMERS;
+----------------------------------------------+---------+
| NAME                                         | ENABLED |
+----------------------------------------------+---------+
| events_waits_current                         | YES     |
| events_waits_history                         | YES     |
| events_waits_history_long                    | YES     |
| events_waits_summary_by_thread_by_event_name | YES     |
| events_waits_summary_by_event_name           | YES     |
| events_waits_summary_by_instance             | YES     |
| file_summary_by_event_name                   | YES     |
| file_summary_by_instance                     | YES     |
+----------------------------------------------+---------+
        The SETUP_CONSUMERS table has these columns:
      
            NAME
          
            The consumer name. This is the name of a table in the
            performance_schema database.
          
            ENABLED
          
Whether the consumer is enabled. This column can be modified. If you disable a consumer, the server does not spend time adding event information to it.
        Disabling the events_waits_current consumer
        disables everything else that depends on waits, such as the
        EVENTS_WAITS_HISTORY and
        EVENTS_WAITS_HISTORY_LONG tables, and all
        summary tables.
      
        The SETUP_INSTRUMENTS table lists classes of
        instrumented objects for which events can be collected:
      
mysql> SELECT * FROM SETUP_INSTRUMENTS;
+------------------------------------------------------------+---------+-------+
| NAME                                                       | ENABLED | TIMED |
+------------------------------------------------------------+---------+-------+
| wait/synch/mutex/sql/PAGE::lock                            | YES     | YES   |
| wait/synch/mutex/sql/TC_LOG_MMAP::LOCK_sync                | YES     | YES   |
| wait/synch/mutex/sql/TC_LOG_MMAP::LOCK_active              | YES     | YES   |
| wait/synch/mutex/sql/TC_LOG_MMAP::LOCK_pool                | YES     | YES   |
| wait/synch/mutex/sql/LOCK_des_key_file                     | YES     | YES   |
| wait/synch/mutex/sql/MYSQL_BIN_LOG::LOCK_index             | YES     | YES   |
...
        Each instrument added to the source code provides a row for this
        table, even when the instrumented code is not executed. When an
        instrument is enabled and executed, instrumented instances are
        created, which are visible in the *_INSTANCES
        tables.
      
        The SETUP_INSTRUMENTS table has these
        columns:
      
            NAME
          
            The instrument name. Instrument names have multiple parts
            and form a hierarchy, as discussed in
            Section 20.5, “Performance Schema Event Instrument Naming Conventions”.
            Events produced from execution of an instrument have an
            EVENT_NAME value that is taken from the
            instrument NAME value. (Events do not
            really have a “name,” but this provides a way
            to associate events with instruments.)
          
            ENABLED
          
Whether the instrument is enabled. This column can be modified. A disabled instrument produces no events.
            TIMED
          
Whether the instrument is timed. This column can be modified.
            If an enabled instrument is not timed, the instrument code
            is enabled, but the timer is not. Events produced by the
            instrument have NULL for the
            TIMER_START,
            TIMER_END, and
            TIMER_WAIT timer values. This in turn
            causes those values to be ignored when calculating the sum,
            minimum, maximum, and average time values in summary tables.
          
        The SETUP_OBJECTS table is reserved for
        future use, and may change without notice.
      
        The SETUP_TIMERS table shows the currently
        selected event timer:
      
mysql> SELECT * FROM SETUP_TIMERS;
+------+------------+
| NAME | TIMER_NAME |
+------+------------+
| wait | CYCLE      |
+------+------------+
        The SETUP_TIMERS.TIMER_NAME value can be
        changed to select a different timer. The value can be any of the
        PERFORMANCE_TIMERS.TIMER_NAME values. For an
        explanation of how event timing occurs, see
        Section 20.4, “Performance Schema Event Timing”.
      
        The SETUP_TIMERS table has these columns:
      
            NAME
          
The type of instrument the timer is used for.
            TIMER_NAME
          
The timer that applies to the instrument type.

User Comments
Add your own comment.