From 9d2504c0426be595a893ec11271eeae3b5da6851 Mon Sep 17 00:00:00 2001 From: Weizhen Wang Date: Wed, 18 Sep 2024 11:51:06 +0800 Subject: [PATCH 1/5] *: add tidb_auto_analyze_concurrency Signed-off-by: Weizhen Wang --- system-variables.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/system-variables.md b/system-variables.md index 07981bf18e5cc..b356d577dfb4f 100644 --- a/system-variables.md +++ b/system-variables.md @@ -1199,6 +1199,15 @@ mysql> SELECT job_info FROM mysql.analyze_jobs ORDER BY end_time DESC LIMIT 1; 1 row in set (0.00 sec) ``` +### tidb_auto_analyze_concurrency New in v8.4.0 + +- Scope: GLOBAL +- Persists to cluster: Yes +- Applies to hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value): No +- Default value: `2` +- Range: `[1, 2147483647]` +- This variable is used to set the concurrency of executing the automatic update of statistics. + ### tidb_auto_analyze_end_time - Scope: GLOBAL From 29114fb3d0654972d0746ac9f6fd778f25c2ef63 Mon Sep 17 00:00:00 2001 From: Aolin Date: Mon, 23 Sep 2024 14:35:03 +0800 Subject: [PATCH 2/5] add type Signed-off-by: Aolin --- system-variables.md | 1 + 1 file changed, 1 insertion(+) diff --git a/system-variables.md b/system-variables.md index b356d577dfb4f..84851ff1bb267 100644 --- a/system-variables.md +++ b/system-variables.md @@ -1204,6 +1204,7 @@ mysql> SELECT job_info FROM mysql.analyze_jobs ORDER BY end_time DESC LIMIT 1; - Scope: GLOBAL - Persists to cluster: Yes - Applies to hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value): No +- Type: Integer - Default value: `2` - Range: `[1, 2147483647]` - This variable is used to set the concurrency of executing the automatic update of statistics. From 9de3d6a7be881f4723828cc45831071a41d24505 Mon Sep 17 00:00:00 2001 From: Weizhen Wang Date: Tue, 24 Sep 2024 13:11:45 +0800 Subject: [PATCH 3/5] Update system-variables.md --- system-variables.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system-variables.md b/system-variables.md index 84851ff1bb267..ab58df0c7eb8a 100644 --- a/system-variables.md +++ b/system-variables.md @@ -1205,7 +1205,7 @@ mysql> SELECT job_info FROM mysql.analyze_jobs ORDER BY end_time DESC LIMIT 1; - Persists to cluster: Yes - Applies to hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value): No - Type: Integer -- Default value: `2` +- Default value: `1` - Range: `[1, 2147483647]` - This variable is used to set the concurrency of executing the automatic update of statistics. From c11747c8d5d680ba926ce5328f2900ff6e59b68d Mon Sep 17 00:00:00 2001 From: Aolin Date: Thu, 26 Sep 2024 10:20:09 +0800 Subject: [PATCH 4/5] Apply suggestions from code review --- system-variables.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system-variables.md b/system-variables.md index ab58df0c7eb8a..458f69dce2901 100644 --- a/system-variables.md +++ b/system-variables.md @@ -1207,7 +1207,7 @@ mysql> SELECT job_info FROM mysql.analyze_jobs ORDER BY end_time DESC LIMIT 1; - Type: Integer - Default value: `1` - Range: `[1, 2147483647]` -- This variable is used to set the concurrency of executing the automatic update of statistics. +- This variable is used to set the concurrency within a signle automatic statistics collection task. Before v8.4.0, the concurrecncy for each automatic statistics collection task is fixed at `1`. You can increase this concurrency to speed up statistics collection tasks based on your cluster's available resources. ### tidb_auto_analyze_end_time From 5f653acb5aa615b5738b3f51d27e9d171b297488 Mon Sep 17 00:00:00 2001 From: Aolin Date: Fri, 27 Sep 2024 10:36:32 +0800 Subject: [PATCH 5/5] Apply suggestions from code review Co-authored-by: Grace Cai --- system-variables.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system-variables.md b/system-variables.md index 458f69dce2901..dec782742e8ca 100644 --- a/system-variables.md +++ b/system-variables.md @@ -1207,7 +1207,7 @@ mysql> SELECT job_info FROM mysql.analyze_jobs ORDER BY end_time DESC LIMIT 1; - Type: Integer - Default value: `1` - Range: `[1, 2147483647]` -- This variable is used to set the concurrency within a signle automatic statistics collection task. Before v8.4.0, the concurrecncy for each automatic statistics collection task is fixed at `1`. You can increase this concurrency to speed up statistics collection tasks based on your cluster's available resources. +- This variable is used to set the concurrency within a single automatic statistics collection task. Before v8.4.0, this concurrency is fixed at `1`. To speed up statistics collection tasks, you can increase this concurrency based on your cluster's available resources. ### tidb_auto_analyze_end_time