diff --git a/statistics/handle/update.go b/statistics/handle/update.go index a06a786d62499..a915294135ac6 100644 --- a/statistics/handle/update.go +++ b/statistics/handle/update.go @@ -400,7 +400,7 @@ var ( // DumpStatsDeltaRatio is the lower bound of `Modify Count / Table Count` for stats delta to be dumped. DumpStatsDeltaRatio = 1 / 10000.0 // dumpStatsMaxDuration is the max duration since last update. - dumpStatsMaxDuration = time.Hour + dumpStatsMaxDuration = 5 * time.Minute ) // needDumpStatsDelta checks whether to dump stats delta. @@ -427,7 +427,7 @@ func (h *Handle) needDumpStatsDelta(is infoschema.InfoSchema, mode dumpMode, id item.InitTime = currentTime } if currentTime.Sub(item.InitTime) > dumpStatsMaxDuration { - // Dump the stats to kv at least once an hour. + // Dump the stats to kv at least once 5 minutes. return true } statsTbl := h.GetPartitionStats(tbl.Meta(), id)