Rechercher dans le manuel MySQL
The INNODB_CMP_PER_INDEX
and
INNODB_CMP_PER_INDEX_RESET
tables provide status information on operations related to
compressed
InnoDB
tables and indexes, with separate
statistics for each combination of database, table, and index, to
help you evaluate the performance and usefulness of compression
for specific tables.
For a compressed InnoDB
table, both the table
data and all the secondary
indexes are compressed. In this context, the table data is
treated as just another index, one that happens to contain all the
columns: the clustered
index.
The INNODB_CMP_PER_INDEX
and
INNODB_CMP_PER_INDEX_RESET
tables have these columns:
DATABASE_NAME
The schema (database) containing the applicable table.
TABLE_NAME
The table to monitor for compression statistics.
INDEX_NAME
The index to monitor for compression statistics.
COMPRESS_OPS
The number of compression operations attempted. Pages are compressed whenever an empty page is created or the space for the uncompressed modification log runs out.
COMPRESS_OPS_OK
The number of successful compression operations. Subtract from the
COMPRESS_OPS
value to get the number of compression failures. Divide by theCOMPRESS_OPS
value to get the percentage of compression failures.COMPRESS_TIME
The total time in seconds used for compressing data in this index.
UNCOMPRESS_OPS
The number of uncompression operations performed. Compressed
InnoDB
pages are uncompressed whenever compression fails, or the first time a compressed page is accessed in the buffer pool and the uncompressed page does not exist.UNCOMPRESS_TIME
The total time in seconds used for uncompressing data in this index.
Example
- *************************** 1. row ***************************
- database_name: employees
- table_name: salaries
- index_name: PRIMARY
- compress_ops: 0
- compress_ops_ok: 0
- compress_time: 0
- uncompress_ops: 23451
- uncompress_time: 4
- *************************** 2. row ***************************
- database_name: employees
- table_name: salaries
- index_name: emp_no
- compress_ops: 0
- compress_ops_ok: 0
- compress_time: 0
- uncompress_ops: 1597
- uncompress_time: 0
Notes
Use these tables to measure the effectiveness of
InnoDB
table compression for specific tables, indexes, or both.You must have the
PROCESS
privilege to query these tables.Use the
INFORMATION_SCHEMA
COLUMNS
table or theSHOW COLUMNS
statement to view additional information about the columns of these tables, including data types and default values.Because collecting separate measurements for every index imposes substantial performance overhead,
INNODB_CMP_PER_INDEX
andINNODB_CMP_PER_INDEX_RESET
statistics are not gathered by default. You must enable theinnodb_cmp_per_index_enabled
system variable before performing the operations on compressed tables that you want to monitor.For usage information, see Section 15.9.1.4, “Monitoring InnoDB Table Compression at Runtime” and Section 15.14.1.3, “Using the Compression Information Schema Tables”. For general information about
InnoDB
table compression, see Section 15.9, “InnoDB Table and Page Compression”.
Traduction non disponible
Le manuel MySQL n'est pas encore traduit en français sur l'infobrol. Seule la version anglaise est disponible pour l'instant.
Document créé le 26/06/2006, dernière modification le 26/10/2018
Source du document imprimé : https://www.gaudry.be/mysql-rf-innodb-cmp-per-index-table.html
L'infobrol est un site personnel dont le contenu n'engage que moi. Le texte est mis à disposition sous licence CreativeCommons(BY-NC-SA). Plus d'info sur les conditions d'utilisation et sur l'auteur.
Références
Ces références et liens indiquent des documents consultés lors de la rédaction de cette page, ou qui peuvent apporter un complément d'information, mais les auteurs de ces sources ne peuvent être tenus responsables du contenu de cette page.
L'auteur de ce site est seul responsable de la manière dont sont présentés ici les différents concepts, et des libertés qui sont prises avec les ouvrages de référence. N'oubliez pas que vous devez croiser les informations de sources multiples afin de diminuer les risques d'erreurs.