Using performance_schema

You can inspect the internal execution of the server at runtime using performance_schema. This should not be confused with information schema, which is used to inspect metadata.

There are many event consumers in performance_schema that influence the timings of a server, such as a function call, a wait for the operating system, a stage of an SQL statement execution (say, parsing or sorting), a single statement, or a group of statements. All the collected information is stored in performance_schema and is not replicated.

performance_schema is enabled by default; if you want to disable it, you can set performance_schema=OFF in the my.cnf file. By default, not all the consumers and instruments are enabled; you can turn ...

Get MySQL 8 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.