Skip to content

Commit b1ad558

Browse files
lilin90alivxxx
authored andcommitted
sql: add auto-analyze-ratio (#442)
1 parent e59df04 commit b1ad558

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

sql/statistics.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ ANALYZE TABLE TableName INDEX [IndexNameList]
3131

3232
For the `INSERT`, `DELETE`, or `UPDATE` statements, TiDB automatically updates the number of rows and updated rows. TiDB persists this information regularly and the update cycle is 5 * `stats-lease`. The default value of `stats-lease` is `3s`. If you specify the value as `0`, it does not update automatically.
3333

34+
When the ratio of the number of modified rows to the total number of rows is greater than `auto-analyze-ratio`, TiDB automatically starts the `Analyze` statement. You can modify the value of `auto-analyze-ratio` in the configuration file. The default value is `0`, which means that this function is not enabled.
35+
3436
When the query is executed, TiDB collects feedback with the probability of `feedback-probability` and uses it to update the histogram and Count-Min Sketch. You can modify the value of `feedback-probability` in the configuration file. The default value is `0`.
3537

3638
### Control `ANALYZE` concurrency

0 commit comments

Comments
 (0)