Skip to content

Commit

Permalink
address comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Haibin Xie committed Apr 26, 2018
1 parent f3b349f commit 4c0f51e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sql/statistics.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ ANALYZE TABLE TableName INDEX [IndexNameList]
在发生增加,删除以及修改语句时,TiDB 会自动更新表的总行数以及修改的行数。这些信息会定期持久化下来,
更新的周期是 5 * `stats-lease`, `stats-lease` 的默认值是 3s,如果将其指定为 0,那么将不会自动更新。

当修改的行数与总行数的比值大于 `auto-analyze-ratio` 时,TiDB 会自动发起 `Analyze` 语句。 `auto-analyze-ratio` 可通过配置文件修改,其默认值是 0,即不开启此功能。

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

### 控制 ANALYZE 并发度
Expand Down

0 comments on commit 4c0f51e

Please sign in to comment.