Documentation Home
MySQL 5.5 Reference Manual
Related Documentation Download this Manual
PDF (US Ltr) - 27.2Mb
PDF (A4) - 27.2Mb
PDF (RPM) - 25.8Mb
HTML Download (TGZ) - 6.5Mb
HTML Download (Zip) - 6.6Mb
HTML Download (RPM) - 5.6Mb
Man Pages (TGZ) - 158.5Kb
Man Pages (Zip) - 262.1Kb
Info (Gzip) - 2.6Mb
Info (Zip) - 2.6Mb
Excerpts from this Manual

MySQL 5.5 Reference Manual  /  ...  /  Performance Schema Wait Event Tables

22.10.4 Performance Schema Wait Event Tables

The Performance Schema instruments waits, which are events that take time.

These tables store wait events:

The following sections describe the wait event tables. There are also summary tables that aggregate information about wait events; see Section, “Wait Event Summary Tables”.

For more information about the relationship between the three wait event tables, see Section 22.8, “Performance Schema Tables for Current and Historical Events”.

Configuring Wait Event Collection

To control whether to collect wait events, set the state of the relevant instruments and consumers:

  • The setup_instruments table contains instruments with names that begin with wait. Use these instruments to enable or disable collection of individual wait event classes.

  • The setup_consumers table contains consumer values with names corresponding to the current and historical wait event table names. Use these consumers to filter collection of wait events.

The wait instruments are enabled by default. For example:

mysql> SELECT * FROM performance_schema.setup_instruments
       WHERE NAME LIKE 'wait/io/file/innodb%';
| NAME                                 | ENABLED | TIMED |
| wait/io/file/innodb/innodb_data_file | YES     | YES   |
| wait/io/file/innodb/innodb_log_file  | YES     | YES   |
| wait/io/file/innodb/innodb_temp_file | YES     | YES   |

The wait consumers are enabled by default:

mysql> SELECT *
       FROM performance_schema.setup_consumers
       WHERE NAME LIKE 'events_waits%';
| NAME                      | ENABLED |
| events_waits_current      | YES     |
| events_waits_history      | YES     |
| events_waits_history_long | YES     |

To control wait event collection, update the setup_instruments and setup_consumers tables:

  • Enable:

    UPDATE performance_schema.setup_instruments
    WHERE NAME = 'wait/%';
    UPDATE performance_schema.setup_consumers
    WHERE NAME LIKE 'events_waits%';
  • Disable:

    UPDATE performance_schema.setup_instruments
    WHERE NAME = 'wait/%';
    UPDATE performance_schema.setup_consumers
    WHERE NAME LIKE 'events_waits%';

To collect only specific wait events, enable only the corresponding wait instruments. To collect wait events only for specific wait event tables, enable the wait instruments but only the wait consumers corresponding to the desired tables.

The setup_timers table contains a row with a NAME value of wait that indicates the unit for wait event timing. The default unit is CYCLE:

mysql> SELECT *
       FROM performance_schema.setup_timers
       WHERE NAME = 'wait';
| wait | CYCLE      |

To change the timing unit, modify the TIMER_NAME value:

UPDATE performance_schema.setup_timers
WHERE NAME = 'wait';

For additional information about configuring event collection, see Section 22.4, “Performance Schema Runtime Configuration”.

User Comments
User comments in this section are, as the name implies, provided by MySQL users. The MySQL documentation team is not responsible for, nor do they endorse, any of the information provided here.
Sign Up Login You must be logged in to post a comment.