From d56363e26e473da6f2499f9ba17998cfc6c6d0c6 Mon Sep 17 00:00:00 2001 From: Liuxiaozhen12 <82579298+Liuxiaozhen12@users.noreply.github.com> Date: Fri, 3 Sep 2021 10:50:14 +0800 Subject: [PATCH 1/5] This is an automated cherry-pick of #6299 Signed-off-by: ti-chi-bot --- system-variables.md | 29 +++++++++++++++++++++++++++++ tidb-configuration-file.md | 13 +++++++++++++ 2 files changed, 42 insertions(+) diff --git a/system-variables.md b/system-variables.md index 3f52d6e032899..63a1cedea955c 100644 --- a/system-variables.md +++ b/system-variables.md @@ -804,32 +804,61 @@ SET tidb_slow_log_threshold = 200; ### tidb_stmt_summary_history_size New in v4.0 - Scope: SESSION | GLOBAL +<<<<<<< HEAD - Default value: 24 (the value of the default configuration file) - This variable is used to set the history capacity of the statement summary. +======= +- Default value: `24` +- Range: `[0, 255]` +- This variable is used to set the history capacity of [statement summary tables](/statement-summary-tables.md). +>>>>>>> 7f8909a47 (change expressions related to statement summary tables (#6299)) ### tidb_stmt_summary_internal_query New in v4.0 - Scope: SESSION | GLOBAL +<<<<<<< HEAD - Default value: 0 (the value of the default configuration file) - This variable is used to control whether to include the SQL information of TiDB in the statement summary. +======= +- Default value: `OFF` +- This variable is used to control whether to include the SQL information of TiDB in [statement summary tables](/statement-summary-tables.md). +>>>>>>> 7f8909a47 (change expressions related to statement summary tables (#6299)) ### tidb_stmt_summary_max_sql_length New in v4.0 - Scope: SESSION | GLOBAL +<<<<<<< HEAD - Default value: 4096 (the value of the default configuration file) - This variable is used to control the length of the SQL string in the statement summary. +======= +- Default value: `4096` +- Range: `[0, 2147483647]` +- This variable is used to control the length of the SQL string in [statement summary tables](/statement-summary-tables.md). +>>>>>>> 7f8909a47 (change expressions related to statement summary tables (#6299)) ### tidb_stmt_summary_max_stmt_count New in v4.0 - Scope: SESSION | GLOBAL +<<<<<<< HEAD - Default value: Before v4.0.14, the default value is 200. Since v4.0.14, the default value is 3000 (the value of the default configuration file). - This variable is used to set the maximum number of statements that the statement summary stores in memory. +======= +- Default value: `3000` +- Range: `[1, 32767]` +- This variable is used to set the maximum number of statements that [statement summary tables](/statement-summary-tables.md) store in memory. +>>>>>>> 7f8909a47 (change expressions related to statement summary tables (#6299)) ### tidb_stmt_summary_refresh_interval New in v4.0 - Scope: SESSION | GLOBAL +<<<<<<< HEAD - Default value: 1800 (the value of the default configuration file) - This variable is used to set the refresh time of the statement summary. The unit is second. +======= +- Default value: `1800` +- Range: `[1, 2147483647]` +- This variable is used to set the refresh time of [statement summary tables](/statement-summary-tables.md). The unit is second. +>>>>>>> 7f8909a47 (change expressions related to statement summary tables (#6299)) ### tidb_store_limit New in v3.0.4 and v4.0 diff --git a/tidb-configuration-file.md b/tidb-configuration-file.md index 6f4a91ff4babd..de13348a448c7 100644 --- a/tidb-configuration-file.md +++ b/tidb-configuration-file.md @@ -569,6 +569,7 @@ Configuration related to the status of TiDB service. ## stmt-summary New in v3.0.4 +<<<<<<< HEAD Configurations related to the `events_statement_summary_by_digest` table. ### max-stmt-count @@ -579,6 +580,18 @@ Configurations related to the `events_statement_summary_by_digest` table. ### max-sql-length - The longest display length for the `DIGEST_TEXT` and `QUERY_SAMPLE_TEXT` columns in the `events_statement_summary_by_digest` table. +======= +Configurations related to [statement summary tables](/statement-summary-tables.md). + +### max-stmt-count + +- The maximum number of SQL categories allowed to be saved in [statement summary tables](/statement-summary-tables.md). +- Default value: `3000` + +### max-sql-length + +- The longest display length for the `DIGEST_TEXT` and `QUERY_SAMPLE_TEXT` columns in [statement summary tables](/statement-summary-tables.md). +>>>>>>> 7f8909a47 (change expressions related to statement summary tables (#6299)) - Default value: `4096` ## pessimistic-txn From 2ad8e05f8aea5b9d19246595004ef0f361e57b1f Mon Sep 17 00:00:00 2001 From: Liuxiaozhen12 <82579298+Liuxiaozhen12@users.noreply.github.com> Date: Fri, 3 Sep 2021 11:34:30 +0800 Subject: [PATCH 2/5] Update tidb-configuration-file.md --- tidb-configuration-file.md | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/tidb-configuration-file.md b/tidb-configuration-file.md index de13348a448c7..c480fba153c07 100644 --- a/tidb-configuration-file.md +++ b/tidb-configuration-file.md @@ -569,29 +569,16 @@ Configuration related to the status of TiDB service. ## stmt-summary New in v3.0.4 -<<<<<<< HEAD -Configurations related to the `events_statement_summary_by_digest` table. - -### max-stmt-count - -- The maximum number of SQL categories allowed to be saved in the `events_statement_summary_by_digest` table. -- Default value: `100` - -### max-sql-length - -- The longest display length for the `DIGEST_TEXT` and `QUERY_SAMPLE_TEXT` columns in the `events_statement_summary_by_digest` table. -======= Configurations related to [statement summary tables](/statement-summary-tables.md). ### max-stmt-count - The maximum number of SQL categories allowed to be saved in [statement summary tables](/statement-summary-tables.md). -- Default value: `3000` +- Default value: `200` ### max-sql-length - The longest display length for the `DIGEST_TEXT` and `QUERY_SAMPLE_TEXT` columns in [statement summary tables](/statement-summary-tables.md). ->>>>>>> 7f8909a47 (change expressions related to statement summary tables (#6299)) - Default value: `4096` ## pessimistic-txn From bd898b467734fdfbad49b9683a194f5d519fa91b Mon Sep 17 00:00:00 2001 From: Liuxiaozhen12 <82579298+Liuxiaozhen12@users.noreply.github.com> Date: Fri, 3 Sep 2021 11:39:38 +0800 Subject: [PATCH 3/5] Update system-variables.md --- system-variables.md | 29 ----------------------------- 1 file changed, 29 deletions(-) diff --git a/system-variables.md b/system-variables.md index 63a1cedea955c..f547d7f5801b1 100644 --- a/system-variables.md +++ b/system-variables.md @@ -804,61 +804,32 @@ SET tidb_slow_log_threshold = 200; ### tidb_stmt_summary_history_size New in v4.0 - Scope: SESSION | GLOBAL -<<<<<<< HEAD - Default value: 24 (the value of the default configuration file) -- This variable is used to set the history capacity of the statement summary. -======= -- Default value: `24` -- Range: `[0, 255]` - This variable is used to set the history capacity of [statement summary tables](/statement-summary-tables.md). ->>>>>>> 7f8909a47 (change expressions related to statement summary tables (#6299)) ### tidb_stmt_summary_internal_query New in v4.0 - Scope: SESSION | GLOBAL -<<<<<<< HEAD - Default value: 0 (the value of the default configuration file) -- This variable is used to control whether to include the SQL information of TiDB in the statement summary. -======= -- Default value: `OFF` - This variable is used to control whether to include the SQL information of TiDB in [statement summary tables](/statement-summary-tables.md). ->>>>>>> 7f8909a47 (change expressions related to statement summary tables (#6299)) ### tidb_stmt_summary_max_sql_length New in v4.0 - Scope: SESSION | GLOBAL -<<<<<<< HEAD - Default value: 4096 (the value of the default configuration file) -- This variable is used to control the length of the SQL string in the statement summary. -======= -- Default value: `4096` -- Range: `[0, 2147483647]` - This variable is used to control the length of the SQL string in [statement summary tables](/statement-summary-tables.md). ->>>>>>> 7f8909a47 (change expressions related to statement summary tables (#6299)) ### tidb_stmt_summary_max_stmt_count New in v4.0 - Scope: SESSION | GLOBAL -<<<<<<< HEAD - Default value: Before v4.0.14, the default value is 200. Since v4.0.14, the default value is 3000 (the value of the default configuration file). -- This variable is used to set the maximum number of statements that the statement summary stores in memory. -======= -- Default value: `3000` -- Range: `[1, 32767]` - This variable is used to set the maximum number of statements that [statement summary tables](/statement-summary-tables.md) store in memory. ->>>>>>> 7f8909a47 (change expressions related to statement summary tables (#6299)) ### tidb_stmt_summary_refresh_interval New in v4.0 - Scope: SESSION | GLOBAL -<<<<<<< HEAD - Default value: 1800 (the value of the default configuration file) -- This variable is used to set the refresh time of the statement summary. The unit is second. -======= -- Default value: `1800` -- Range: `[1, 2147483647]` - This variable is used to set the refresh time of [statement summary tables](/statement-summary-tables.md). The unit is second. ->>>>>>> 7f8909a47 (change expressions related to statement summary tables (#6299)) ### tidb_store_limit New in v3.0.4 and v4.0 From 2943426c6ea689821eb365abf85483778640bd87 Mon Sep 17 00:00:00 2001 From: Liuxiaozhen12 <82579298+Liuxiaozhen12@users.noreply.github.com> Date: Fri, 3 Sep 2021 11:47:06 +0800 Subject: [PATCH 4/5] Update tidb-configuration-file.md --- tidb-configuration-file.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tidb-configuration-file.md b/tidb-configuration-file.md index c480fba153c07..ca0e16edadd71 100644 --- a/tidb-configuration-file.md +++ b/tidb-configuration-file.md @@ -574,7 +574,7 @@ Configurations related to [statement summary tables](/statement-summary-tables.m ### max-stmt-count - The maximum number of SQL categories allowed to be saved in [statement summary tables](/statement-summary-tables.md). -- Default value: `200` +- In versions earlier than v4.0.14, the default value of this variable is `200`. Since v4.0.14, the default value of this variable is `3000` ### max-sql-length From 13d8cc4a63be986510474d91d78f09060f19a589 Mon Sep 17 00:00:00 2001 From: Liuxiaozhen12 <82579298+Liuxiaozhen12@users.noreply.github.com> Date: Fri, 3 Sep 2021 11:49:43 +0800 Subject: [PATCH 5/5] Update tidb-configuration-file.md --- tidb-configuration-file.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tidb-configuration-file.md b/tidb-configuration-file.md index ca0e16edadd71..3dbe986f0da12 100644 --- a/tidb-configuration-file.md +++ b/tidb-configuration-file.md @@ -574,7 +574,7 @@ Configurations related to [statement summary tables](/statement-summary-tables.m ### max-stmt-count - The maximum number of SQL categories allowed to be saved in [statement summary tables](/statement-summary-tables.md). -- In versions earlier than v4.0.14, the default value of this variable is `200`. Since v4.0.14, the default value of this variable is `3000` +- Default value: Before v4.0.14, the default value is `200`. Since v4.0.14, the default value is `3000`. ### max-sql-length