diff --git a/pkg/statistics/table.go b/pkg/statistics/table.go index 507ea7b3418fb..603da81529e4a 100644 --- a/pkg/statistics/table.go +++ b/pkg/statistics/table.go @@ -606,9 +606,12 @@ func (coll *HistColl) GetScaledRealtimeAndModifyCnt(idxStats *Index) (realtimeCn // GetStatsHealthy calculates stats healthy if the table stats is not pseudo. // If the table stats is pseudo, it returns 0, false, otherwise it returns stats healthy, true. func (t *Table) GetStatsHealthy() (int64, bool) { - if t == nil || t.Pseudo || !t.IsAnalyzed() { + if t == nil || t.Pseudo { return 0, false } + if !t.IsAnalyzed() { + return 0, true + } var healthy int64 count := float64(t.RealtimeCount) if histCount := t.GetAnalyzeRowCount(); histCount > 0 {