x$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 `x$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`,
sum(if(`ibp`.`COMPRESSED_SIZE` = 0,16384,`ibp`.`COMPRESSED_SIZE`)) AS `allocated`,
sum(`ibp`.`DATA_SIZE`) AS `data`,
count(`ibp`.`PAGE_NUMBER`) AS `pages`,
count(if(`ibp`.`IS_HASHED`,1,NULL)) AS `pages_hashed`,
count(if(`ibp`.`IS_OLD`,1,NULL)) AS `pages_old`,
round(ifnull(sum(`ibp`.`NUMBER_RECORDS`) / nullif(count(distinct `ibp`.`INDEX_NAME`),0),0),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