SHOW GLOBAL VARIABLES LIKE 'INNODB_STATS_PERSISTENT_SAMPLE_PAGES';
ALTER TABLE TABLE_NAME STATS_SAMPLE_PAGES=40;
ANALYZE TABLE TABLE_NAME;