Geen cache-versie.

Caching uitgeschakeld. Standaardinstelling voor deze pagina:ingeschakeld (code DEF204)
Als het scherm te langzaam is, kunt u de gebruikersmodus uitschakelen om de cacheversie te bekijken.

Rechercher dans le manuel MySQL

26.12.4 Performance Schema Wait Event Tables

The Performance Schema instruments waits, which are events that take time. Within the event hierarchy, wait events nest within stage events, which nest within statement events, which nest within transaction events.

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 26.12.17.1, “Wait Event Summary Tables”.

For more information about the relationship between the three wait event tables, see Section 26.9, “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.

Some wait instruments are enabled by default; others are disabled. For example:

  1. mysql> SELECT NAME, ENABLED, TIMED
  2.        FROM performance_schema.setup_instruments
  3.        WHERE NAME LIKE 'wait/io/file/innodb%';
  4. +-------------------------------------------------+---------+-------+
  5. | NAME                                            | ENABLED | TIMED |
  6. +-------------------------------------------------+---------+-------+
  7. | wait/io/file/innodb/innodb_tablespace_open_file | YES     | YES   |
  8. | wait/io/file/innodb/innodb_data_file            | YES     | YES   |
  9. | wait/io/file/innodb/innodb_log_file             | YES     | YES   |
  10. | wait/io/file/innodb/innodb_temp_file            | YES     | YES   |
  11. | wait/io/file/innodb/innodb_arch_file            | YES     | YES   |
  12. | wait/io/file/innodb/innodb_clone_file           | YES     | YES   |
  13. +-------------------------------------------------+---------+-------+
  14. mysql> SELECT NAME, ENABLED, TIMED
  15.        FROM performance_schema.setup_instruments
  16.        WHERE NAME LIKE 'wait/io/socket/%';
  17. +----------------------------------------+---------+-------+
  18. | NAME                                   | ENABLED | TIMED |
  19. +----------------------------------------+---------+-------+
  20. | wait/io/socket/sql/server_tcpip_socket | NO      | NO    |
  21. | wait/io/socket/sql/server_unix_socket  | NO      | NO    |
  22. | wait/io/socket/sql/client_connection   | NO      | NO    |
  23. +----------------------------------------+---------+-------+

The wait consumers are disabled by default:

  1. mysql> SELECT *
  2.        FROM performance_schema.setup_consumers
  3.        WHERE NAME LIKE 'events_waits%';
  4. +---------------------------+---------+
  5. | NAME                      | ENABLED |
  6. +---------------------------+---------+
  7. | events_waits_current      | NO      |
  8. | events_waits_history      | NO      |
  9. | events_waits_history_long | NO      |
  10. +---------------------------+---------+

To control wait event collection at server startup, use lines like these in your my.cnf file:

  • Enable:

    [mysqld]
    performance-schema-instrument='wait/%=ON'
    performance-schema-consumer-events-waits-current=ON
    performance-schema-consumer-events-waits-history=ON
    performance-schema-consumer-events-waits-history-long=ON
  • Disable:

    [mysqld]
    performance-schema-instrument='wait/%=OFF'
    performance-schema-consumer-events-waits-current=OFF
    performance-schema-consumer-events-waits-history=OFF
    performance-schema-consumer-events-waits-history-long=OFF

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

  • Enable:

    1. UPDATE performance_schema.setup_instruments
    2. SET ENABLED = 'YES', TIMED = 'YES'
    3. WHERE NAME = 'wait/%';
    4.  
    5. UPDATE performance_schema.setup_consumers
    6. SET ENABLED = 'YES'
    7. WHERE NAME LIKE 'events_waits%';
  • Disable:

    1. UPDATE performance_schema.setup_instruments
    2. SET ENABLED = 'NO', TIMED = 'NO'
    3. WHERE NAME = 'wait/%';
    4.  
    5. UPDATE performance_schema.setup_consumers
    6. SET ENABLED = 'NO'
    7. 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.

For additional information about configuring event collection, see Section 26.3, “Performance Schema Startup Configuration”, and Section 26.4, “Performance Schema Runtime Configuration”.


Zoek in de MySQL-handleiding

Nederlandse vertaling

U hebt gevraagd om deze site in het Nederlands te bezoeken. Voor nu wordt alleen de interface vertaald, maar nog niet alle inhoud.

Als je me wilt helpen met vertalingen, is je bijdrage welkom. Het enige dat u hoeft te doen, is u op de site registreren en mij een bericht sturen waarin u wordt gevraagd om u toe te voegen aan de groep vertalers, zodat u de gewenste pagina's kunt vertalen. Een link onderaan elke vertaalde pagina geeft aan dat u de vertaler bent en heeft een link naar uw profiel.

Bij voorbaat dank.

Document heeft de 26/06/2006 gemaakt, de laatste keer de 26/10/2018 gewijzigd
Bron van het afgedrukte document:https://www.gaudry.be/nl/mysql-rf-performance-schema-wait-tables.html

De infobrol is een persoonlijke site waarvan de inhoud uitsluitend mijn verantwoordelijkheid is. De tekst is beschikbaar onder CreativeCommons-licentie (BY-NC-SA). Meer info op de gebruiksvoorwaarden en de auteur.

Referenties

  1. Bekijk - html-document Taal van het document:en Manuel MySQL : https://dev.mysql.com/

Deze verwijzingen en links verwijzen naar documenten die geraadpleegd zijn tijdens het schrijven van deze pagina, of die aanvullende informatie kunnen geven, maar de auteurs van deze bronnen kunnen niet verantwoordelijk worden gehouden voor de inhoud van deze pagina.
De auteur Deze site is als enige verantwoordelijk voor de manier waarop de verschillende concepten, en de vrijheden die met de referentiewerken worden genomen, hier worden gepresenteerd. Vergeet niet dat u meerdere broninformatie moet doorgeven om het risico op fouten te verkleinen.

Inhoudsopgave Haut