Skip to content

PopSQL: limited support.

Migrate now →

InnoDB buffer pool hit ratio

Share of page reads served from memory. Below 99% on a busy server means the buffer pool is smaller than the working set.

MySQL · SQL
SELECT ROUND(100 * (1 - disk.v / NULLIF(mem.v, 0)), 2) AS hit_pct,
       mem.v AS read_requests,
       disk.v AS disk_reads
FROM (SELECT CAST(variable_value AS UNSIGNED) AS v FROM performance_schema.global_status WHERE variable_name = 'Innodb_buffer_pool_read_requests') mem,
     (SELECT CAST(variable_value AS UNSIGNED) AS v FROM performance_schema.global_status WHERE variable_name = 'Innodb_buffer_pool_reads') disk

This query is part of the "MySQL health" pack: connect the database in DataRunner and install the whole pack — queries, dashboard and checks — at once.