From 8d345cd09aedfa72d3018ee5ebdfd452de056e25 Mon Sep 17 00:00:00 2001 From: Haibin Xie Date: Tue, 8 May 2018 19:18:50 +0800 Subject: [PATCH] *: open auto analyze and stats feedback by default (#6500) --- config/config.go | 2 +- config/config.toml.example | 2 +- sessionctx/variable/tidb_vars.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config/config.go b/config/config.go index 9fcf062cf2..348eaa959e 100644 --- a/config/config.go +++ b/config/config.go @@ -264,7 +264,7 @@ var defaultConf = Config{ StatsLease: "3s", RunAutoAnalyze: true, StmtCountLimit: 5000, - FeedbackProbability: 0, + FeedbackProbability: 0.05, QueryFeedbackLimit: 1024, PseudoEstimateRatio: 0.7, }, diff --git a/config/config.toml.example b/config/config.toml.example index d850b30044..b67358286d 100644 --- a/config/config.toml.example +++ b/config/config.toml.example @@ -131,7 +131,7 @@ stats-lease = "3s" run-auto-analyze = true # Probability to use the query feedback to update stats, 0 or 1 for always false/true. -feedback-probability = 0.0 +feedback-probability = 0.05 # The max number of query feedback that cache in memory. query-feedback-limit = 1024 diff --git a/sessionctx/variable/tidb_vars.go b/sessionctx/variable/tidb_vars.go index 63b522f3ac..1695fdcb77 100644 --- a/sessionctx/variable/tidb_vars.go +++ b/sessionctx/variable/tidb_vars.go @@ -167,7 +167,7 @@ const ( DefIndexLookupSize = 20000 DefDistSQLScanConcurrency = 15 DefBuildStatsConcurrency = 4 - DefAutoAnalyzeRatio = 0.0 + DefAutoAnalyzeRatio = 0.7 DefChecksumTableConcurrency = 4 DefSkipUTF8Check = false DefOptAggPushDown = false