diff --git a/planner/core/planbuilder.go b/planner/core/planbuilder.go index 10a9819900b59..a32205536a4d3 100644 --- a/planner/core/planbuilder.go +++ b/planner/core/planbuilder.go @@ -2945,7 +2945,7 @@ var CMSketchSizeLimit = kv.TxnEntrySizeLimit / binary.MaxVarintLen32 var analyzeOptionLimit = map[ast.AnalyzeOptionType]uint64{ ast.AnalyzeOptNumBuckets: 1024, - ast.AnalyzeOptNumTopN: 1024, + ast.AnalyzeOptNumTopN: 16384, ast.AnalyzeOptCMSketchWidth: CMSketchSizeLimit, ast.AnalyzeOptCMSketchDepth: CMSketchSizeLimit, ast.AnalyzeOptNumSamples: 500000, diff --git a/statistics/handle/handletest/analyze/analyze_test.go b/statistics/handle/handletest/analyze/analyze_test.go index b785fb0b2c648..b43c9e04444b8 100644 --- a/statistics/handle/handletest/analyze/analyze_test.go +++ b/statistics/handle/handletest/analyze/analyze_test.go @@ -154,7 +154,7 @@ func TestAnalyzeGlobalStatsWithOpts1(t *testing.T) { {77, 219, false}, {-31, 222, true}, {10, -77, true}, - {10000, 47, true}, + {100000, 47, true}, {77, 47000, true}, } for _, ca := range cases {