diff --git a/statistics.md b/statistics.md index a7aa8f570e02d..42705219db467 100644 --- a/statistics.md +++ b/statistics.md @@ -430,7 +430,7 @@ When you run the `ANALYZE` statement, you can adjust the concurrency using the f #### `tidb_build_stats_concurrency` -Currently, when you run the `ANALYZE` statement, the task is divided into multiple small tasks. Each task only works on one column or index. You can use the `tidb_build_stats_concurrency` parameter to control the number of simultaneous tasks. The default value is `4`. +This variable controls the concurrency for building statistics during manual `ANALYZE`, such as the number of table or partition analysis tasks that can be processed simultaneously. The default value is `4`. #### `tidb_distsql_scan_concurrency` diff --git a/system-variables.md b/system-variables.md index d884ce66d3623..0cb0cfd89d9e6 100644 --- a/system-variables.md +++ b/system-variables.md @@ -967,7 +967,8 @@ MPP is a distributed computing framework provided by the TiFlash engine, which a - Scope: SESSION | GLOBAL - Persists to cluster: Yes - Default value: `1` -- This variable specifies the concurrency of reading and writing statistics for a partitioned table when TiDB analyzes the partitioned table. +- Range: `[1, 18446744073709551615]` +- For manual and auto `ANALYZE`, this variable controls the concurrency for saving `ANALYZE` results, including writing TopN and histograms to system tables. ### tidb_analyze_version New in v5.1.0 @@ -1028,7 +1029,7 @@ MPP is a distributed computing framework provided by the TiFlash engine, which a - Type: Integer - Default value: `1` - Range: `[1, 256]` -- This variable is used to set the concurrency of executing the automatic update of statistics. +- This variable controls the concurrency for building statistics during auto `ANALYZE`, such as the number of table or partition analysis tasks that can be processed simultaneously. ### tidb_backoff_lock_fast @@ -1124,8 +1125,7 @@ MPP is a distributed computing framework provided by the TiFlash engine, which a - Default value: `4` - Range: `[1, 256]` - Unit: Threads -- This variable is used to set the concurrency of executing the `ANALYZE` statement. -- When the variable is set to a larger value, the execution performance of other queries is affected. +- This variable controls the concurrency for building statistics during manual `ANALYZE`, such as the number of table or partition analysis tasks that can be processed simultaneously. ### tidb_capture_plan_baselines New in v4.0 @@ -3225,7 +3225,7 @@ For a system upgraded to v5.0 from an earlier version, if you have not modified - Scope: SESSION | GLOBAL - Persists to cluster: Yes - Default value: `1` -- This variable specifies the concurrency of merging statistics for a partitioned table when TiDB analyzes the partitioned table. +- This variable controls the concurrency for merging TopN results of partitioned tables. ### tidb_metric_query_range_duration New in v4.0