innodb_buffer_stats_by_table
This page is part of MariaDB's Documentation.
The parent of this page is: Sys Database Tables for MariaDB Enterprise Server
Topics on this page:
Overview
DETAILS
SCHEMA
VIEW `innodb_buffer_stats_by_table` AS SELECT
if(locate('.',`ibp`.`TABLE_NAME`) = 0,'InnoDB System',replace(substring_index(`ibp`.`TABLE_NAME`,'.',1),'`','')) AS `object_schema`,
replace(substring_index(`ibp`.`TABLE_NAME`,'.',-1),'`','') AS `object_name`,
`sys`.`format_bytes`(sum(if(`ibp`.`COMPRESSED_SIZE` = 0,16384,`ibp`.`COMPRESSED_SIZE`))) AS `allocated`,
`sys`.`format_bytes`(sum(`ibp`.`DATA_SIZE`)) AS `data`,
count(`ibp`.`PAGE_NUMBER`) AS `pages`,
count(if(`ibp`.`IS_HASHED` = 'YES',1,NULL)) AS `pages_hashed`,
count(if(`ibp`.`IS_OLD` = 'YES',1,NULL)) AS `pages_old`,
round(sum(`ibp`.`NUMBER_RECORDS`) / count(distinct `ibp`.`INDEX_NAME`),0) AS `rows_cached`
FROM `information_schema`.`innodb_buffer_page` `ibp` where `ibp`.`TABLE_NAME` is not null group by if(locate('.',`ibp`.`TABLE_NAME`) = 0,'InnoDB System',replace(substring_index(`ibp`.`TABLE_NAME`,'.',1),'`','')),replace(substring_index(`ibp`.`TABLE_NAME`,'.',-1),'`','') order by sum(if(`ibp`.`COMPRESSED_SIZE` = 0,16384,`ibp`.`COMPRESSED_SIZE`)) desc