文档首页
MySQL 8.4 参考手册
8.4 中文镜像

MySQL 8.4 参考手册 · 中文镜像

正文为中文,英文原文默认隐藏。点击任意中文段落即可展开 / 收起对应英文原文。

打开官方英文原文 ↗

译文由机器翻译生成,仅供理解参考;有疑问请以官方英文原文为准。

MySQL 8.4 参考手册 / 28 个 INFORMATION_SCHEMA 表 / 28.4 INFORMATION_SCHEMA InnoDB 表 / 28.4.8 INFORMATION_SCHEMA INNODB_CMP_PER_INDEX 和 INNODB_CMP_PER_INDEX_RESET 表
中文点击中文段落可显示 / 隐藏英文原文本页译文覆盖 74%

28.4.8 INFORMATION_SCHEMA INNODB_CMP_PER_INDEX 和 INNODB_CMP_PER_INDEX_RESET 表28.4.8 The INFORMATION_SCHEMA INNODB_CMP_PER_INDEX and INNODB_CMP_PER_INDEX_RESET Tables

INNODB_CMP_PER_INDEX 和 INNODB_CMP_PER_INDEX_RESET 表提供了与 压缩 InnoDB 表和索引相关操作的状态信息,为每个数据库、表和索引组合提供单独的统计信息,以帮助您评估压缩对特定表的性能和实用性。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.

对于压缩的InnoDB表,表数据和所有的二级索引都被压缩。在这种情况下,表数据被视为另一个索引,它恰好包含所有列:即聚簇索引。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.

INNODB_CMP_PER_INDEX和INNODB_CMP_PER_INDEX_RESET表具有以下列: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_NAMETABLE_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

    成功的压缩操作次数。从 COMPRESS_OPS 值中减去即可得到压缩失败的次数。除以 COMPRESS_OPS 值即可得到压缩失败的百分比。The number of successful compression operations. Subtract from the COMPRESS_OPS value to get the number of compression failures. Divide by the COMPRESS_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

    执行的解压操作次数。每当压缩 InnoDB 页面 失败,或者第一次在 缓冲池 中访问压缩页面且未存在未压缩页面时,都会对压缩页面进行解压。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

mysql> SELECT * FROM INFORMATION_SCHEMA.INNODB_CMP_PER_INDEX\G
*************************** 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