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

MySQL 8.4 参考手册 · 中文镜像

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

打开官方英文原文 ↗

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

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

28.4.4 INFORMATION_SCHEMA INNODB_BUFFER_POOL_STATS 表28.4.4 The INFORMATION_SCHEMA INNODB_BUFFER_POOL_STATS Table

INNODB_BUFFER_POOL_STATS 表提供了与 SHOW ENGINE INNODB STATUS 输出中提供的大部分缓冲池信息相同的信息。通过 InnoDB 缓冲池的 服务器状态变量 也可以获得大部分相同的信息。The INNODB_BUFFER_POOL_STATS table provides much of the same buffer pool information provided in SHOW ENGINE INNODB STATUS output. Much of the same information may also be obtained using InnoDB buffer pool server status variables.

在缓冲池中将页面标记为“年轻”或“不年轻”的概念,指的是在缓冲池数据结构的头部和尾部的子列表之间进行转移。标记为“年轻”的页面在缓冲池中老化得更慢,而标记为“不年轻”的页面则被移得更接近驱逐点。The idea of making pages in the buffer pool “young” or “not young” refers to transferring them between the sublists at the head and tail of the buffer pool data structure. Pages made “young” take longer to age out of the buffer pool, while pages made “not young” are moved much closer to the point of eviction.

有关相关用法信息和示例,请参见 第 17.15.5 节,“InnoDB INFORMATION_SCHEMA 缓冲池表”。For related usage information and examples, see Section 17.15.5, “InnoDB INFORMATION_SCHEMA Buffer Pool Tables”.

INNODB_BUFFER_POOL_STATS 表包含以下列:The INNODB_BUFFER_POOL_STATS table has these columns:

  • POOL_ID

    缓冲池 ID。这是用于区分多个缓冲池实例的标识符。The buffer pool ID. This is an identifier to distinguish between multiple buffer pool instances.

  • POOL_SIZE

    InnoDB 缓冲池大小(以页为单位)。The InnoDB buffer pool size in pages.

  • FREE_BUFFERS

    InnoDB 缓冲池中空闲页的数量。The number of free pages in the InnoDB buffer pool.

  • DATABASE_PAGES

    InnoDB 缓冲池中包含数据的页数。此数字包括脏页和干净页。The number of pages in the InnoDB buffer pool containing data. This number includes both dirty and clean pages.

  • OLD_DATABASE_PAGES

    The number of pages in the old buffer pool sublist.

  • MODIFIED_DATABASE_PAGES

    已修改(脏)数据库页的数量。The number of modified (dirty) database pages.

  • PENDING_DECOMPRESS

    待解压的页数。The number of pages pending decompression.

  • PENDING_READS

    待读取的页数。The number of pending reads.

  • PENDING_FLUSH_LRU

    LRU 中等待刷新页的数量。The number of pages pending flush in the LRU.

  • PENDING_FLUSH_LIST

    刷新列表中等待刷新页的数量。The number of pages pending flush in the flush list.

  • PAGES_MADE_YOUNG

    被标记为年轻的页的数量。The number of pages made young.

  • PAGES_NOT_MADE_YOUNG

    未被标记为年轻的页的数量。The number of pages not made young.

  • PAGES_MADE_YOUNG_RATE

    每秒被标记为年轻的页的数量(自上次打印以来标记为年轻的页数 / 经过的时间)。The number of pages made young per second (pages made young since the last printout / time elapsed).

  • PAGES_MADE_NOT_YOUNG_RATE

    每秒未被标记的页的数量(自上次打印以来未被标记为年轻的页数 / 经过的时间)。The number of pages not made per second (pages not made young since the last printout / time elapsed).

  • NUMBER_PAGES_READ

    已读取页的数量。The number of pages read.

  • NUMBER_PAGES_CREATED

    创建的页数。The number of pages created.

  • NUMBER_PAGES_WRITTEN

    写入的页数。The number of pages written.

  • PAGES_READ_RATE

    每秒读取的页数(自上次输出以来读取的页数 / 已用时间)。The number of pages read per second (pages read since the last printout / time elapsed).

  • PAGES_CREATE_RATE

    每秒创建的页数(自上次输出以来创建的页数 / 已用时间)。The number of pages created per second (pages created since the last printout / time elapsed).

  • PAGES_WRITTEN_RATE

    每秒写入的页数(自上次输出以来写入的页数 / 已用时间)。The number of pages written per second (pages written since the last printout / time elapsed).

  • NUMBER_PAGES_GET

    逻辑读取请求的数量。The number of logical read requests.

  • HIT_RATE

    缓冲池命中率。The buffer pool hit rate.

  • YOUNG_MAKE_PER_THOUSAND_GETS

    每千次获取创建的年轻页数。The number of pages made young per thousand gets.

  • NOT_YOUNG_MAKE_PER_THOUSAND_GETS

    每千次获取未被年轻化的页数。The number of pages not made young per thousand gets.

  • NUMBER_PAGES_READ_AHEAD

    预读的页数。The number of pages read ahead.

  • NUMBER_READ_AHEAD_EVICTED

    由预读后台线程读入 InnoDB 缓冲池但随后未被查询访问就被驱逐的页数。The number of pages read into the InnoDB buffer pool by the read-ahead background thread that were subsequently evicted without having been accessed by queries.

  • READ_AHEAD_RATE

    每秒预读速率(自上次打印以来预读的页数 / 所经过时间)。The read-ahead rate per second (pages read ahead since the last printout / time elapsed).

  • READ_AHEAD_EVICTED_RATE

    每秒未访问而被驱逐的预读页数(自上次打印以来未被访问的预读页数 / 所经过时间)。The number of read-ahead pages evicted without access per second (read-ahead pages not accessed since the last printout / time elapsed).

  • LRU_IO_TOTAL

    LRU 总 I/O。Total LRU I/O.

  • LRU_IO_CURRENT

    当前时间间隔的 LRU I/O。LRU I/O for the current interval.

  • UNCOMPRESS_TOTAL

    已解压的页面总数。The total number of pages decompressed.

  • UNCOMPRESS_CURRENT

    当前时间间隔内解压的页面数。The number of pages decompressed in the current interval.

示例Example

mysql> SELECT * FROM INFORMATION_SCHEMA.INNODB_BUFFER_POOL_STATS\G
*************************** 1. row ***************************
                         POOL_ID: 0
                       POOL_SIZE: 8192
                    FREE_BUFFERS: 1
                  DATABASE_PAGES: 8085
              OLD_DATABASE_PAGES: 2964
         MODIFIED_DATABASE_PAGES: 0
              PENDING_DECOMPRESS: 0
                   PENDING_READS: 0
               PENDING_FLUSH_LRU: 0
              PENDING_FLUSH_LIST: 0
                PAGES_MADE_YOUNG: 22821
            PAGES_NOT_MADE_YOUNG: 3544303
           PAGES_MADE_YOUNG_RATE: 357.62602199870594
       PAGES_MADE_NOT_YOUNG_RATE: 0
               NUMBER_PAGES_READ: 2389
            NUMBER_PAGES_CREATED: 12385
            NUMBER_PAGES_WRITTEN: 13111
                 PAGES_READ_RATE: 0
               PAGES_CREATE_RATE: 0
              PAGES_WRITTEN_RATE: 0
                NUMBER_PAGES_GET: 33322210
                        HIT_RATE: 1000
    YOUNG_MAKE_PER_THOUSAND_GETS: 18
NOT_YOUNG_MAKE_PER_THOUSAND_GETS: 0
         NUMBER_PAGES_READ_AHEAD: 2024
       NUMBER_READ_AHEAD_EVICTED: 0
                 READ_AHEAD_RATE: 0
         READ_AHEAD_EVICTED_RATE: 0
                    LRU_IO_TOTAL: 0
                  LRU_IO_CURRENT: 0
                UNCOMPRESS_TOTAL: 0
              UNCOMPRESS_CURRENT: 0

注意事项Notes

  • 此表主要用于专家级性能监控,或者在为 MySQL 开发与性能相关的扩展时使用。This table is useful primarily for expert-level performance monitoring, or when developing performance-related extensions for MySQL.

  • 你必须拥有 PROCESS 权限才能查询此表。You must have the PROCESS privilege to query this table.

  • 使用 INFORMATION_SCHEMA COLUMNS 表或 SHOW COLUMNS 语句查看关于此表列的更多信息,包括数据类型和默认值。Use the INFORMATION_SCHEMA COLUMNS table or the SHOW COLUMNS statement to view additional information about the columns of this table, including data types and default values.