From 71a4cad67a33cc236368344c038abd058c97c3c0 Mon Sep 17 00:00:00 2001 From: Grace Cai Date: Tue, 17 Oct 2023 18:17:00 +0800 Subject: [PATCH] statistics: add info about tidb_auto_analyze_partition_batch_size (#15032) --- statistics.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/statistics.md b/statistics.md index b88c398ac0bb9..de80c9c2a98f5 100644 --- a/statistics.md +++ b/statistics.md @@ -382,9 +382,10 @@ Three system variables related to automatic update of statistics are as follows: | System Variable | Default Value | Description | |---|---|---| -| `tidb_auto_analyze_ratio`| 0.5 | The threshold value of automatic update | -| `tidb_auto_analyze_start_time` | `00:00 +0000` | The start time in a day when TiDB can perform automatic update | -| `tidb_auto_analyze_end_time` | `23:59 +0000` | The end time in a day when TiDB can perform automatic update | +| [`tidb_auto_analyze_ratio`](/system-variables.md#tidb_auto_analyze_ratio) | 0.5 | The threshold value of automatic update | +| [`tidb_auto_analyze_start_time`](/system-variables.md#tidb_auto_analyze_start_time) | `00:00 +0000` | The start time in a day when TiDB can perform automatic update | +| [`tidb_auto_analyze_end_time`](/system-variables.md#tidb_auto_analyze_end_time) | `23:59 +0000` | The end time in a day when TiDB can perform automatic update | +| [`tidb_auto_analyze_partition_batch_size`](/system-variables.md#tidb_auto_analyze_partition_batch_size-new-in-v640) | `1` | The number of partitions that TiDB automatically analyzes when analyzing a partitioned table (that is, when automatically updating statistics on a partitioned table) | 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.