diff --git a/pkg/statistics/column.go b/pkg/statistics/column.go index 5f2d38efdf011..507a72c2e04a3 100644 --- a/pkg/statistics/column.go +++ b/pkg/statistics/column.go @@ -15,8 +15,6 @@ package statistics import ( - "strconv" - "github.com/pingcap/tidb/pkg/parser/model" "github.com/pingcap/tidb/pkg/parser/mysql" "github.com/pingcap/tidb/pkg/planner/util/debugtrace" @@ -168,7 +166,9 @@ func (c *Column) IsInvalid( if (!c.IsStatsInitialized() || c.IsLoadNeeded()) && stmtctx != nil { if stmtctx.StatsLoad.Timeout > 0 { logutil.BgLogger().Warn("Hist for column should already be loaded as sync but not found.", - zap.String(strconv.FormatInt(c.Info.ID, 10), c.Info.Name.O)) + zap.Int64("table_id", c.PhysicalID), + zap.Int64("column_id", c.Info.ID), + zap.String("column_name", c.Info.Name.O)) } // In some tests, the c.Info is not set, so we add this check here. // When we are using stats from PseudoTable(), the table ID will possibly be -1.