Index: storage/innobase/dict/dict0dict.c =================================================================== --- storage/innobase/dict/dict0dict.c (revision 1) +++ storage/innobase/dict/dict0dict.c (working copy) @@ -4366,6 +4366,14 @@ dict_table_stats_lock(table, RW_X_LATCH); + /* re-check the stat_modified_counter, avoiding unnecessary dict_update_statistics */ + counter = table->stat_modified_counter; + if (counter < 2000000000 && ((ib_int64_t)counter < 16 + table->stat_n_rows / 16)) + { + dict_table_stats_unlock(table, RW_X_LATCH); + return; + } + if (only_calc_if_missing_stats && table->stat_initialized) { dict_table_stats_unlock(table, RW_X_LATCH); return;