MetaPii 技術室

あなたの知恵と思いを検索するフラッシュメモアプリMetaPiiのエンジニアブログです。

MySQLのinformation_schema.tables が更新されない

いろいろ調べました。

環境

原因

どうも「information_schema_stats_expiry」というのが関係するようです。

show SESSION VARIABLES like 'information_schema_stats_expiry';
+---------------------------------+-------+
| Variable_name                   | Value |
+---------------------------------+-------+
| information_schema_stats_expiry | 86400 |
+---------------------------------+-------+
1 row in set (0.02 sec)

対処

これでOK。

SET SESSION information_schema_stats_expiry= 1;

参考

yoku0825.blogspot.com