Skip to content

Commit 45960e8

Browse files
authored
planner: increase the maximum number limit of TopN when analyzing tables (#45962)
ref #45919
1 parent 6fb20c9 commit 45960e8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

planner/core/planbuilder.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2945,7 +2945,7 @@ var CMSketchSizeLimit = kv.TxnEntrySizeLimit / binary.MaxVarintLen32
29452945

29462946
var analyzeOptionLimit = map[ast.AnalyzeOptionType]uint64{
29472947
ast.AnalyzeOptNumBuckets: 1024,
2948-
ast.AnalyzeOptNumTopN: 1024,
2948+
ast.AnalyzeOptNumTopN: 16384,
29492949
ast.AnalyzeOptCMSketchWidth: CMSketchSizeLimit,
29502950
ast.AnalyzeOptCMSketchDepth: CMSketchSizeLimit,
29512951
ast.AnalyzeOptNumSamples: 500000,

statistics/handle/handletest/analyze/analyze_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ func TestAnalyzeGlobalStatsWithOpts1(t *testing.T) {
154154
{77, 219, false},
155155
{-31, 222, true},
156156
{10, -77, true},
157-
{10000, 47, true},
157+
{100000, 47, true},
158158
{77, 47000, true},
159159
}
160160
for _, ca := range cases {

0 commit comments

Comments
 (0)