diff --git a/sql/statistics.md b/sql/statistics.md index 826c9b18ad5de..9b760a13d3268 100644 --- a/sql/statistics.md +++ b/sql/statistics.md @@ -31,6 +31,8 @@ ANALYZE TABLE TableName INDEX [IndexNameList] 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. +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. + 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`. ### Control `ANALYZE` concurrency