INNODB_CMPMEM 和 INNODB_CMPMEM_RESET 表提供了 InnoDB 缓冲池中已压缩页的状态信息。The INNODB_CMPMEM and
INNODB_CMPMEM_RESET tables provide
status information on compressed
pages within the
InnoDB buffer
pool.
INNODB_CMPMEM 和 INNODB_CMPMEM_RESET 表具有以下列:The INNODB_CMPMEM and
INNODB_CMPMEM_RESET tables have these
columns:
PAGE_SIZE以字节为单位的块大小。此表的每条记录描述该大小的块。The block size in bytes. Each record of this table describes blocks of this size.
BUFFER_POOL_INSTANCE缓冲池实例的唯一标识符。A unique identifier for the buffer pool instance.
PAGES_USED当前正在使用的
PAGE_SIZE大小块的数量。The number of blocks of sizePAGE_SIZEthat are currently in use.PAGES_FREE当前可用于分配的
PAGE_SIZE大小的区块数量。此列显示内存池中的外部碎片情况。理想情况下,这些数字应最多为 1。The number of blocks of sizePAGE_SIZEthat are currently available for allocation. This column shows the external fragmentation in the memory pool. Ideally, these numbers should be at most 1.RELOCATION_OPS大小为
PAGE_SIZE的区块被重新定位的次数。当尝试形成更大的空闲区块时,伙伴系统可以重新定位已分配区块的“伙伴邻居”。从INNODB_CMPMEM_RESET表读取数据会重置此计数。The number of times a block of sizePAGE_SIZEhas been relocated. The buddy system can relocate the allocated “buddy neighbor” of a freed block when it tries to form a bigger freed block. Reading from theINNODB_CMPMEM_RESETtable resets this count.RELOCATION_TIME用于重新定位大小为
PAGE_SIZE的块的总时间(以微秒为单位)。从表INNODB_CMPMEM_RESET读取将重置此计数。The total time in microseconds used for relocating blocks of sizePAGE_SIZE. Reading from the tableINNODB_CMPMEM_RESETresets this count.
示例Example
mysql> SELECT * FROM INFORMATION_SCHEMA.INNODB_CMPMEM\G
*************************** 1. row ***************************
page_size: 1024
buffer_pool_instance: 0
pages_used: 0
pages_free: 0
relocation_ops: 0
relocation_time: 0
*************************** 2. row ***************************
page_size: 2048
buffer_pool_instance: 0
pages_used: 0
pages_free: 0
relocation_ops: 0
relocation_time: 0
*************************** 3. row ***************************
page_size: 4096
buffer_pool_instance: 0
pages_used: 0
pages_free: 0
relocation_ops: 0
relocation_time: 0
*************************** 4. row ***************************
page_size: 8192
buffer_pool_instance: 0
pages_used: 7673
pages_free: 15
relocation_ops: 4638
relocation_time: 0
*************************** 5. row ***************************
page_size: 16384
buffer_pool_instance: 0
pages_used: 0
pages_free: 0
relocation_ops: 0
relocation_time: 0
备注Notes
使用这些表来衡量数据库中
InnoDB表压缩的效果。Use these tables to measure the effectiveness ofInnoDBtable compression in your database.你必须拥有
PROCESS权限才能查询此表。You must have thePROCESSprivilege to query this table.使用
INFORMATION_SCHEMACOLUMNS表或SHOW COLUMNS语句查看关于此表列的更多信息,包括数据类型和默认值。Use theINFORMATION_SCHEMACOLUMNStable or theSHOW COLUMNSstatement to view additional information about the columns of this table, including data types and default values.有关使用信息,请参见第 17.9.1.4 节,“运行时监控 InnoDB 表压缩”和第 17.15.1.3 节,“使用压缩信息模式表”。有关
InnoDB表压缩的一般信息,请参见第 17.9 节,“InnoDB 表和页面压缩”。For usage information, see Section 17.9.1.4, “Monitoring InnoDB Table Compression at Runtime” and Section 17.15.1.3, “Using the Compression Information Schema Tables”. For general information aboutInnoDBtable compression, see Section 17.9, “InnoDB Table and Page Compression”.