Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change the default value of feedback-probability #4331

Merged
merged 6 commits into from
Sep 8, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion statistics.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,11 @@ ANALYZE INCREMENTAL TABLE TableName PARTITION PartitionNameList INDEX [IndexName

当某个表 `tbl` 的修改行数与总行数的比值大于 `tidb_auto_analyze_ratio`,并且当前时间在 `tidb_auto_analyze_start_time` 和 `tidb_auto_analyze_end_time` 之间时,TiDB 会在后台执行 `ANALYZE TABLE tbl` 语句自动更新这个表的统计信息。

在查询语句执行时,TiDB 会以 `feedback-probability` 的概率收集反馈信息,并将其用于更新直方图和 Count-Min Sketch。`feedback-probability` 可通过配置文件修改,其默认值是 `0.0`。
在查询语句执行时,TiDB 会以 `feedback-probability` 的概率收集反馈信息,并将其用于更新直方图和 Count-Min Sketch。可通过配置文件修改 `feedback-probability`,其默认值是 `0.05`。设置成 `0.0` 可以关闭这个功能。

> **注意:**
>
> 在配置文件中如果将 `feedback-probability` 设置为 `0` 会导致设置失败并报错。需要设置成 `0.0` 才可以关闭 `feedback-probability`。

### 控制 ANALYZE 并发度

Expand Down