MySQLのinformation_schema.tables が更新されない
いろいろ調べました。
環境
- Mysql 8.0 on docker
原因
どうも「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;