Rechercher dans le manuel MySQL

26.5 Performance Schema Queries

Pre-filtering limits which event information is collected and is independent of any particular user. By contrast, post-filtering is performed by individual users through the use of queries with appropriate WHERE clauses that restrict what event information to select from the events available after pre-filtering has been applied.

In Section 26.4.3, “Event Pre-Filtering”, an example showed how to pre-filter for file instruments. If the event tables contain both file and nonfile information, post-filtering is another way to see information only for file events. Add a WHERE clause to queries to restrict event selection appropriately:

  1. mysql> SELECT THREAD_ID, NUMBER_OF_BYTES
  2.        FROM performance_schema.events_waits_history
  3.        WHERE EVENT_NAME LIKE 'wait/io/file/%'
  4.        AND NUMBER_OF_BYTES IS NOT NULL;
  5. +-----------+-----------------+
  6. | THREAD_ID | NUMBER_OF_BYTES |
  7. +-----------+-----------------+
  8. |        11 |              66 |
  9. |        11 |              47 |
  10. |        11 |             139 |
  11. |         5 |              24 |
  12. |         5 |             834 |
  13. +-----------+-----------------+

Most Performance Schema tables have indexes, which gives the optimizer access to execution plans other than full table scans. These indexes also improve performance for related objects, such as sys schema views that use those tables. For more information, see Section 8.2.4, “Optimizing Performance Schema Queries”.


Find a PHP function

Document created the 26/06/2006, last modified the 26/10/2018
Source of the printed document:https://www.gaudry.be/en/mysql-rf-performance-schema-queries.html

The infobrol is a personal site whose content is my sole responsibility. The text is available under CreativeCommons license (BY-NC-SA). More info on the terms of use and the author.

References

  1. View the html document Language of the document:en Manuel MySQL : https://dev.mysql.com/

These references and links indicate documents consulted during the writing of this page, or which may provide additional information, but the authors of these sources can not be held responsible for the content of this page.
The author This site is solely responsible for the way in which the various concepts, and the freedoms that are taken with the reference works, are presented here. Remember that you must cross multiple source information to reduce the risk of errors.

Contents Haut