diff --git a/sql/analyzer/costed_index_scan.go b/sql/analyzer/costed_index_scan.go index fda0ab9b08..b33ab55069 100644 --- a/sql/analyzer/costed_index_scan.go +++ b/sql/analyzer/costed_index_scan.go @@ -138,8 +138,8 @@ func costedIndexLookup(ctx *sql.Context, n sql.Node, a *Analyzer, iat sql.IndexA } a.Log("new indexed table: %s/%s/%s", ita.Index().Database(), ita.Index().Table(), ita.Index().ID()) - a.Log("index stats cnt: ", stats.RowCount()) - a.Log("index stats histogram", stats.Histogram().DebugString()) + a.Log("index stats cnt: %d", stats.RowCount()) + a.Log("index stats histogram: %s", stats.Histogram().DebugString()) // excluded from tree + not included in index scan => filter above scan if len(filters) > 0 { diff --git a/sql/memo/memo.go b/sql/memo/memo.go index 25ede7f2c4..4dd401815e 100644 --- a/sql/memo/memo.go +++ b/sql/memo/memo.go @@ -322,9 +322,9 @@ func (m *Memo) memoizeIndexScan(grp *ExprGroup, ita *plan.IndexedTableAccess, al // as done early. func (m *Memo) MemoizeStaticIndexAccess(grp *ExprGroup, aliasName string, idx *Index, ita *plan.IndexedTableAccess, filters []sql.Expression, stat sql.Statistic) { if m.Debug { - m.Ctx.GetLogger().Debug("new indexed table: %s/%s/%s", ita.Index().Database(), ita.Index().Table(), ita.Index().ID()) - m.Ctx.GetLogger().Debug("index stats cnt: ", stat.RowCount()) - m.Ctx.GetLogger().Debug("index stats histogram", stat.Histogram().DebugString()) + m.Ctx.GetLogger().Debugf("new indexed table: %s/%s/%s", ita.Index().Database(), ita.Index().Table(), ita.Index().ID()) + m.Ctx.GetLogger().Debugf("index stats cnt: %d: ", stat.RowCount()) + m.Ctx.GetLogger().Debugf("index stats histogram: %s", stat.Histogram().DebugString()) } if len(filters) > 0 { // set the indexed path as best. correct for cases where