No cache version.

Caching disabled. Default setting for this page:enabled (code DEF204)
If the display is too slow, you can disable the user mode to view the cached version.

Rechercher dans le manuel MySQL

26.11 Performance Schema General Table Characteristics

The name of the performance_schema database is lowercase, as are the names of tables within it. Queries should specify the names in lowercase.

Many tables in the performance_schema database are read only and cannot be modified:

  1. mysql> TRUNCATE TABLE performance_schema.setup_instruments;
  2. ERROR 1683 (HY000): Invalid performance_schema usage.

Some of the setup tables have columns that can be modified to affect Performance Schema operation; some also permit rows to be inserted or deleted. Truncation is permitted to clear collected events, so TRUNCATE TABLE can be used on tables containing those kinds of information, such as tables named with a prefix of events_waits_.

Summary tables can be truncated with TRUNCATE TABLE. Generally, the effect is to reset the summary columns to 0 or NULL, not to remove rows. This enables you to clear collected values and restart aggregation. That might be useful, for example, after you have made a runtime configuration change. Exceptions to this truncation behavior are noted in individual summary table sections.

Privileges are as for other databases and tables:

  • To retrieve from performance_schema tables, you must have the SELECT privilege.

  • To change those columns that can be modified, you must have the UPDATE privilege.

  • To truncate tables that can be truncated, you must have the DROP privilege.

Because only a limited set of privileges apply to Performance Schema tables, attempts to use GRANT ALL as shorthand for granting privileges at the database or table leval fail with an error:

  1. mysql> GRANT ALL ON performance_schema.*
  2.        TO 'u1'@'localhost';
  3. ERROR 1044 (42000): Access denied for user 'root'@'localhost'
  4. to database 'performance_schema'
  5. mysql> GRANT ALL ON performance_schema.setup_instruments
  6.        TO 'u2'@'localhost';
  7. ERROR 1044 (42000): Access denied for user 'root'@'localhost'
  8. to database 'performance_schema'

Instead, grant exactly the desired privileges:

  1. mysql> GRANT SELECT ON performance_schema.*
  2.        TO 'u1'@'localhost';
  3. Query OK, 0 rows affected (0.03 sec)
  4.  
  5. mysql> GRANT SELECT, UPDATE ON performance_schema.setup_instruments
  6.        TO 'u2'@'localhost';
  7. Query OK, 0 rows affected (0.02 sec)

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-table-characteristics.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