Skip to content

Commit

Permalink
Don't update the global stats, since it has not changed
Browse files Browse the repository at this point in the history
  • Loading branch information
mjonss committed Mar 23, 2023
1 parent 9ae2f53 commit 4f54080
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions statistics/handle/ddl.go
Expand Up @@ -68,14 +68,7 @@ func (h *Handle) HandleDDLEvent(t *util.Event) error {
return err
}
}
// Update global stats, even though it should not have changed,
// the updated statistics from the newly reorganized partitions may be better
pruneMode := h.CurrentPruneMode()
if pruneMode == variable.Dynamic && t.PartInfo != nil {
if err := h.updateGlobalStats(t.TableInfo); err != nil {
return err
}
}
// Do not update global stats, since the data have not changed!
case model.ActionFlashbackCluster:
return h.updateStatsVersion()
}
Expand Down

0 comments on commit 4f54080

Please sign in to comment.