MySQL :: How to run ANALYZE TABLE for all tables in a database


I am using MySQL 5.7

How can I run ANALYZE TABLE for all tables in a database. It should work if new tables are added to the database in the future.

This is to update the statistics of table indexes.