diff --git a/pkg/services/searchV2/index.go b/pkg/services/searchV2/index.go index 627b21903e0..5127c781535 100644 --- a/pkg/services/searchV2/index.go +++ b/pkg/services/searchV2/index.go @@ -846,7 +846,7 @@ func (l sqlDashboardLoader) loadAllDashboards(ctx context.Context, limit int, or attribute.Int64("lastID", lastID), )) - rows := make([]*dashboardQueryResult, 0) + rows := make([]*dashboardQueryResult, 0, limit) err := l.sql.WithDbSession(dashboardQueryCtx, func(sess *db.Session) error { sess.Table("dashboard"). Where("org_id = ?", orgID).