Updating stats

from the Artful MySQL Tips List


Since MySQL 5.6, InnoDB has supported persistent index statistics but MySQL may under some circumstances never get round to update the index statistics. -- https://mysql.wisborg.dk/2021/08/22/automatic-update-of-innodb-persistent-statistics-never-triggers/

There are no guarantees when the query optimiser will see statistics refreshed by InnoDB, so you need to regularly run ANALYZE TABLE, also set innodb_stats_persistent_sample_pages=200 or higher---http://oysteing.blogspot.com/2021/09/run-analyze-table-do-not-rely-on.html

Last updated 19 Dec 2024


Return to the Artful MySQL Tips page