Documentation Home
MySQL 9.4 Reference Manual
Related Documentation Download this Manual
PDF (US Ltr) - 41.2Mb
PDF (A4) - 41.3Mb
Man Pages (TGZ) - 262.8Kb
Man Pages (Zip) - 368.8Kb
Info (Gzip) - 4.1Mb
Info (Zip) - 4.1Mb


MySQL 9.4 Reference Manual  / ...  / INFORMATION_SCHEMA Tables  / INFORMATION_SCHEMA InnoDB Tables  /  The INFORMATION_SCHEMA INNODB_CMP_PER_INDEX and INNODB_CMP_PER_INDEX_RESET Tables

28.4.8 The INFORMATION_SCHEMA INNODB_CMP_PER_INDEX andINNODB_CMP_PER_INDEX_RESET Tables

TheINNODB_CMP_PER_INDEX andINNODB_CMP_PER_INDEX_RESET tables provide status information on operations related tocompressedInnoDB 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 compressedInnoDB table, both the table data and all thesecondary indexes are compressed. In this context, the table data is treated as just another index, one that happens to contain all the columns: theclustered index.

TheINNODB_CMP_PER_INDEX andINNODB_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 theCOMPRESS_OPS value to get the number ofcompression 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. CompressedInnoDB pages are uncompressed whenever compressionfails, or the first time a compressed page is accessed in thebuffer pool and the uncompressed page does not exist.

  • UNCOMPRESS_TIME

    The total time in seconds used for uncompressing data in this index.

Example

mysql> SELECT * FROM INFORMATION_SCHEMA.INNODB_CMP_PER_INDEX\G*************************** 1. row ***************************  database_name: employees     table_name: salaries     index_name: PRIMARY   compress_ops: 0compress_ops_ok: 0  compress_time: 0 uncompress_ops: 23451uncompress_time: 4*************************** 2. row ***************************  database_name: employees     table_name: salaries     index_name: emp_no   compress_ops: 0compress_ops_ok: 0  compress_time: 0 uncompress_ops: 1597uncompress_time: 0

Notes