Since MySQL 5.6 InnoDB has supported persistent index statistics.
This means that when you restart MySQL, InnoDB does not have to
recalculate the statistics for the tables, rather it can read the
statistics from its persistent storage. This has several
advantages over the transient statistics, but as it turns out,
there is also a catch: MySQL may under some circumstances never
get around to update the index statistics. This particularly
affects instances that are restarted frequently and tables with a
large number of rows.
Information
Persistent statistics are the default, so unless you have
explicitly chosen not to use them, then you are.
Background
Before I dive into why there are scenarios where persistent
statistics are never updated, it is necessary to recap how
persistent statistics work. Every time the statistics are
updated, the result is stored in the
mysql.innodb_index_stats table with …
[Read more]