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.4.4 Pre-Filtering by Instrument

The setup_instruments table lists the available instruments:

  1. mysql> SELECT NAME, ENABLED, TIMED
  2.        FROM performance_schema.setup_instruments;
  3. +---------------------------------------------------+---------+-------+
  4. | NAME                                              | ENABLED | TIMED |
  5. +---------------------------------------------------+---------+-------+
  6. ...
  7. | stage/sql/end                                     | NO      | NO    |
  8. | stage/sql/executing                               | NO      | NO    |
  9. | stage/sql/init                                    | NO      | NO    |
  10. | stage/sql/insert                                  | NO      | NO    |
  11. ...
  12. | statement/sql/load                                | YES     | YES   |
  13. | statement/sql/grant                               | YES     | YES   |
  14. | statement/sql/check                               | YES     | YES   |
  15. | statement/sql/flush                               | YES     | YES   |
  16. ...
  17. | wait/synch/mutex/sql/LOCK_global_read_lock        | YES     | YES   |
  18. | wait/synch/mutex/sql/LOCK_global_system_variables | YES     | YES   |
  19. | wait/synch/mutex/sql/LOCK_lock_db                 | YES     | YES   |
  20. | wait/synch/mutex/sql/LOCK_manager                 | YES     | YES   |
  21. ...
  22. | wait/synch/rwlock/sql/LOCK_grant                  | YES     | YES   |
  23. | wait/synch/rwlock/sql/LOGGER::LOCK_logger         | YES     | YES   |
  24. | wait/synch/rwlock/sql/LOCK_sys_init_connect       | YES     | YES   |
  25. | wait/synch/rwlock/sql/LOCK_sys_init_slave         | YES     | YES   |
  26. ...
  27. | wait/io/file/sql/binlog                           | YES     | YES   |
  28. | wait/io/file/sql/binlog_index                     | YES     | YES   |
  29. | wait/io/file/sql/casetest                         | YES     | YES   |
  30. | wait/io/file/sql/dbopt                            | YES     | YES   |
  31. ...

To control whether an instrument is enabled, set its ENABLED column to YES or NO. To configure whether to collect timing information for an enabled instrument, set its TIMED value to YES or NO. Setting the TIMED column affects Performance Schema table contents as described in Section 26.4.1, “Performance Schema Event Timing”.

Modifications to most setup_instruments rows affect monitoring immediately. For some instruments, modifications 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.

The setup_instruments table provides the most basic form of control over event production. To further refine event production based on the type of object or thread being monitored, other tables may be used as described in Section 26.4.3, “Event Pre-Filtering”.

The following examples demonstrate possible operations on the setup_instruments table. These changes, like other pre-filtering operations, affect all users. Some of these queries use the LIKE operator and a pattern match instrument names. For additional information about specifying patterns to select instruments, see Section 26.4.9, “Naming Instruments or Consumers for Filtering Operations”.

  • Disable all instruments:

    1. UPDATE performance_schema.setup_instruments
    2. SET ENABLED = 'NO';

    Now no events will be collected.

  • Disable all file instruments, adding them to the current set of disabled instruments:

    1. UPDATE performance_schema.setup_instruments
    2. SET ENABLED = 'NO'
    3. WHERE NAME LIKE 'wait/io/file/%';
  • Disable only file instruments, enable all other instruments:

    1. UPDATE performance_schema.setup_instruments
    2. SET ENABLED = IF(NAME LIKE 'wait/io/file/%', 'NO', 'YES');
  • Enable all but those instruments in the mysys library:

    1. UPDATE performance_schema.setup_instruments
    2. SET ENABLED = CASE WHEN NAME LIKE '%/mysys/%' THEN 'YES' ELSE 'NO' END;
  • Disable a specific instrument:

    1. UPDATE performance_schema.setup_instruments
    2. SET ENABLED = 'NO'
    3. WHERE NAME = 'wait/synch/mutex/mysys/TMPDIR_mutex';
  • To toggle the state of an instrument, flip its ENABLED value:

    1. UPDATE performance_schema.setup_instruments
    2. SET ENABLED = IF(ENABLED = 'YES', 'NO', 'YES')
    3. WHERE NAME = 'wait/synch/mutex/mysys/TMPDIR_mutex';
  • Disable timing for all events:

    1. UPDATE performance_schema.setup_instruments
    2. SET TIMED = 'NO';

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-instrument-filtering.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