Skip to content

Commit

Permalink
statistics: try to eliminate the unnecessary log for sync load
Browse files Browse the repository at this point in the history
  • Loading branch information
winoros committed Nov 28, 2024
1 parent 2b03447 commit 296b172
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/statistics/table.go
Original file line number Diff line number Diff line change
Expand Up @@ -822,10 +822,13 @@ func (t *Table) ColumnIsLoadNeeded(id int64, fullLoad bool) (*Column, bool, bool
// when we use non-lite init stats, it cannot init the stats for common columns.
// so we need to force to load the stats.
col, ok := t.columns[id]
hasAnalyzed := t.ColAndIdxExistenceMap.HasAnalyzed(id, false)
if !ok {
if t.ColAndIdxExistenceMap.Checked() {
return nil, true, hasAnalyzed
}
return nil, true, true
}
hasAnalyzed := t.ColAndIdxExistenceMap.HasAnalyzed(id, false)

// If it's not analyzed yet.
// The real check condition: !ok && !hashAnalyzed.
Expand Down

0 comments on commit 296b172

Please sign in to comment.