Skip to content

Commit

Permalink
planner: update docs for auto analyze (pingcap#11439)
Browse files Browse the repository at this point in the history
  • Loading branch information
TomShawn authored Dec 1, 2022
1 parent 7faab38 commit 41fcae3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions statistics.md
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,8 @@ Three system variables related to automatic update of statistics are as follows:
When the ratio of the number of modified rows to the total number of rows of `tbl` in a table is greater than `tidb_auto_analyze_ratio`, and the current time is between `tidb_auto_analyze_start_time` and `tidb_auto_analyze_end_time`, TiDB executes the `ANALYZE TABLE tbl` statement in the background to automatically update the statistics on this table.
To avoid the situation that modifying a small amount of data on a small table frequently triggers the automatic update, when a table has less than 1000 rows, such data modifying does not trigger the automatic update in TiDB. You can use the `SHOW STATS_META` statement to view the number of rows in a table.
> **Note:**
>
> Currently, the automatic update does not record the configuration items input at manual `ANALYZE`. Therefore, when you use the `WITH` syntax to control the collecting behavior of `ANALYZE`, you need to manually set scheduled tasks to collect statistics.
Expand Down

0 comments on commit 41fcae3

Please sign in to comment.