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.5 Pre-Filtering by Object

The setup_objects table controls whether the Performance Schema monitors particular table and stored program objects. The initial setup_objects contents look like this:

  1. mysql> SELECT * FROM performance_schema.setup_objects;
  2. +-------------+--------------------+-------------+---------+-------+
  3. | OBJECT_TYPE | OBJECT_SCHEMA      | OBJECT_NAME | ENABLED | TIMED |
  4. +-------------+--------------------+-------------+---------+-------+
  5. | EVENT       | mysql              | %           | NO      | NO    |
  6. | EVENT       | performance_schema | %           | NO      | NO    |
  7. | EVENT       | information_schema | %           | NO      | NO    |
  8. | EVENT       | %                  | %           | YES     | YES   |
  9. | FUNCTION    | mysql              | %           | NO      | NO    |
  10. | FUNCTION    | performance_schema | %           | NO      | NO    |
  11. | FUNCTION    | information_schema | %           | NO      | NO    |
  12. | FUNCTION    | %                  | %           | YES     | YES   |
  13. | PROCEDURE   | mysql              | %           | NO      | NO    |
  14. | PROCEDURE   | performance_schema | %           | NO      | NO    |
  15. | PROCEDURE   | information_schema | %           | NO      | NO    |
  16. | PROCEDURE   | %                  | %           | YES     | YES   |
  17. | TABLE       | mysql              | %           | NO      | NO    |
  18. | TABLE       | performance_schema | %           | NO      | NO    |
  19. | TABLE       | information_schema | %           | NO      | NO    |
  20. | TABLE       | %                  | %           | YES     | YES   |
  21. | TRIGGER     | mysql              | %           | NO      | NO    |
  22. | TRIGGER     | performance_schema | %           | NO      | NO    |
  23. | TRIGGER     | information_schema | %           | NO      | NO    |
  24. | TRIGGER     | %                  | %           | YES     | YES   |
  25. +-------------+--------------------+-------------+---------+-------+

Modifications to the setup_objects table affect object monitoring immediately.

The OBJECT_TYPE column indicates the type of object to which a row applies. TABLE filtering affects table I/O events (wait/io/table/sql/handler instrument) and table lock events (wait/lock/table/sql/handler instrument).

The OBJECT_SCHEMA and OBJECT_NAME columns should contain a literal schema or object name, or '%' to match any name.

The ENABLED column indicates whether matching objects are monitored, and TIMED indicates whether to collect timing information. Setting the TIMED column affects Performance Schema table contents as described in Section 26.4.1, “Performance Schema Event Timing”.

The effect of the default object configuration is to instrument all objects except those in the mysql, INFORMATION_SCHEMA, and performance_schema databases. (Tables in the INFORMATION_SCHEMA database are not instrumented regardless of the contents of setup_objects; the row for information_schema.% simply makes this default explicit.)

When the Performance Schema checks for a match in setup_objects, it tries to find more specific matches first. For rows that match a given OBJECT_TYPE, the Performance Schema checks rows in this order:

  • Rows with OBJECT_SCHEMA='literal' and OBJECT_NAME='literal'.

  • Rows with OBJECT_SCHEMA='literal' and OBJECT_NAME='%'.

  • Rows with OBJECT_SCHEMA='%' and OBJECT_NAME='%'.

For example, with a table db1.t1, the Performance Schema looks in TABLE rows for a match for 'db1' and 't1', then for 'db1' and '%', then for '%' and '%'. The order in which matching occurs matters because different matching setup_objects rows can have different ENABLED and TIMED values.

For table-related events, the Performance Schema combines the contents of setup_objects with setup_instruments to determine whether to enable instruments and whether to time enabled instruments:

  • For tables that match a row in setup_objects, table instruments produce events only if ENABLED is YES in both setup_instruments and setup_objects.

  • The TIMED values in the two tables are combined, so that timing information is collected only when both values are YES.

For stored program objects, the Performance Schema takes the ENABLED and TIMED columns directly from the setup_objects row. There is no combining of values with setup_instruments.

Suppose that setup_objects contains the following TABLE rows that apply to db1, db2, and db3:

  1. +-------------+---------------+-------------+---------+-------+
  2. | OBJECT_TYPE | OBJECT_SCHEMA | OBJECT_NAME | ENABLED | TIMED |
  3. +-------------+---------------+-------------+---------+-------+
  4. | TABLE       | db1           | t1          | YES     | YES   |
  5. | TABLE       | db1           | t2          | NO      | NO    |
  6. | TABLE       | db2           | %           | YES     | YES   |
  7. | TABLE       | db3           | %           | NO      | NO    |
  8. | TABLE       | %             | %           | YES     | YES   |
  9. +-------------+---------------+-------------+---------+-------+

If an object-related instrument in setup_instruments has an ENABLED value of NO, events for the object are not monitored. If the ENABLED value is YES, event monitoring occurs according to the ENABLED value in the relevant setup_objects row:

  • db1.t1 events are monitored

  • db1.t2 events are not monitored

  • db2.t3 events are monitored

  • db3.t4 events are not monitored

  • db4.t5 events are monitored

Similar logic applies for combining the TIMED columns from the setup_instruments and setup_objects tables to determine whether to collect event timing information.

If a persistent table and a temporary table have the same name, matching against setup_objects rows occurs the same way for both. It is not possible to enable monitoring for one table but not the other. However, each table is instrumented separately.


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-object-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