TL;DR
-
information_schema.innodb_buffer_pageは重い -
ib_buffer_poolにはテーブルスペースIDが記録されるので、それを使ってほげほげする - こんな感じ?
mysql> SET GLOBAL innodb_buffer_pool_dump_now = 1;
mysql> SELECT space, name FROM information_schema.innodb_sys_tablespaces INTO OUTFILE '/tmp/space.txt';
$ awk -F, '{print $1}' /var/lib/mysql/ib_buffer_pool | sort | join - <(sort /tmp/space.txt) | uniq -c | sort -n -r -k 1 | head
54570 50 hogehoge/fugafuga
12192 27 hogehoge/message
10494 31 hogehoge/piyopiyo
9683 42 hogehoge/magomago
6103 30 hogehoge/message_inbox
MySQL Bugs: #90733: TheMySQL server has hanged up when query on the sys.innodb_buffer_stats_by_table …
[さらに読む]