From 92652b835c50c796c2c67551dbab7be71ae49dcf Mon Sep 17 00:00:00 2001 From: Lilian Lee Date: Fri, 26 Jul 2024 15:41:36 +0800 Subject: [PATCH 1/7] Add temp.md --- temp.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 temp.md diff --git a/temp.md b/temp.md new file mode 100644 index 0000000000000..af27ff4986a7b --- /dev/null +++ b/temp.md @@ -0,0 +1 @@ +This is a test file. \ No newline at end of file From e346bcadf4e665c00fd49f24f88cfaa44a8cc935 Mon Sep 17 00:00:00 2001 From: Lilian Lee Date: Fri, 26 Jul 2024 17:15:29 +0800 Subject: [PATCH 2/7] Delete temp.md --- temp.md | 1 - 1 file changed, 1 deletion(-) delete mode 100644 temp.md diff --git a/temp.md b/temp.md deleted file mode 100644 index af27ff4986a7b..0000000000000 --- a/temp.md +++ /dev/null @@ -1 +0,0 @@ -This is a test file. \ No newline at end of file From eb484e9c733e4a89e46b4a44d28996f0926bee1d Mon Sep 17 00:00:00 2001 From: lilin90 Date: Tue, 20 Aug 2024 16:03:31 +0800 Subject: [PATCH 3/7] Refine descriptions for completeness and clarity --- system-variables.md | 2 +- tidb-configuration-file.md | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/system-variables.md b/system-variables.md index b9551027e72fd..aabf52e8d9cd6 100644 --- a/system-variables.md +++ b/system-variables.md @@ -5258,7 +5258,7 @@ Query OK, 0 rows affected, 1 warning (0.00 sec) - Default value: `300` - Range: `[-1, 9223372036854775807]` - Unit: Milliseconds -- This variable is used to output the threshold value of the time consumed by the slow log. When the time consumed by a query is larger than this value, this query is considered as a slow log and its log is output to the slow query log. +- This variable outputs the threshold value of the time consumed by the slow log, and is set to 300 milliseconds by default. When the time consumed by a query is larger than this value, this query is considered as a slow query log and its log is output to the slow query log. Note that when the output level of [`log.level`](/tidb-configuration-file.md#level) is `"debug"`, all queries are recorded in the slow query log, regardless of the setting of this variable. ### tidb_slow_query_file diff --git a/tidb-configuration-file.md b/tidb-configuration-file.md index 218addbe84679..aef58e768f392 100644 --- a/tidb-configuration-file.md +++ b/tidb-configuration-file.md @@ -309,7 +309,7 @@ Configuration items related to log. - Outputs the threshold value of consumed time in the slow log. - Default value: `300` - Unit: Milliseconds -- If the value in a query is larger than the default value, it is a slow query and is output to the slow log. +- When the time consumed by a query is larger than this value, this query is considered as a slow query log and its log is output to the slow query log. Note that when the output level of [`log.level`](#level) is `"debug"`, all queries are recorded in the slow query log, regardless of the setting of this parameter. - Since v6.1.0, the threshold value of consumed time in the slow log is specified by the TiDB configuration item [`instance.tidb_slow_log_threshold`](/tidb-configuration-file.md#tidb_slow_log_threshold) or the system variable [`tidb_slow_log_threshold`](/system-variables.md#tidb_slow_log_threshold). `slow-threshold` still takes effect. But if `slow-threshold` and `instance.tidb_slow_log_threshold` are set at the same time, the latter takes effect. ### `record-plan-in-slow-log` @@ -900,10 +900,11 @@ Configuration items related to read isolation. ### `tidb_slow_log_threshold` -- This configuration is used to output the threshold value of the time consumed by the slow log. When the time consumed by a query is larger than this value, this query is considered as a slow log and its log is output to the slow query log. +- This configuration is used to output the threshold value of the time consumed by the slow log. - Default value: `300` - Range: `[-1, 9223372036854775807]` - Unit: Milliseconds +- When the time consumed by a query is larger than this value, this query is considered as a slow query log and its log is output to the slow query log. Note that when the output level of [`log.level`](#level) is `"debug"`, all queries are recorded in the slow query log, regardless of the setting of this parameter. - Before v6.1.0, this configuration is set by `slow-threshold`. ### `in-mem-slow-query-topn-num` New in v7.3.0 From 4ae807ade41ab743ff8973616a7206a502c9260e Mon Sep 17 00:00:00 2001 From: lilin90 Date: Tue, 20 Aug 2024 16:16:20 +0800 Subject: [PATCH 4/7] Update link for check --- system-variables.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system-variables.md b/system-variables.md index aabf52e8d9cd6..6650894a13e6c 100644 --- a/system-variables.md +++ b/system-variables.md @@ -5258,7 +5258,7 @@ Query OK, 0 rows affected, 1 warning (0.00 sec) - Default value: `300` - Range: `[-1, 9223372036854775807]` - Unit: Milliseconds -- This variable outputs the threshold value of the time consumed by the slow log, and is set to 300 milliseconds by default. When the time consumed by a query is larger than this value, this query is considered as a slow query log and its log is output to the slow query log. Note that when the output level of [`log.level`](/tidb-configuration-file.md#level) is `"debug"`, all queries are recorded in the slow query log, regardless of the setting of this variable. +- This variable outputs the threshold value of the time consumed by the slow log, and is set to 300 milliseconds by default. When the time consumed by a query is larger than this value, this query is considered as a slow query log and its log is output to the slow query log. Note that when the output level of [`log.level`](https://docs.pingcap.com/tidb/dev/tidb-configuration-file#level) is `"debug"`, all queries are recorded in the slow query log, regardless of the setting of this variable. ### tidb_slow_query_file From e1a1905132f8a6d81acc43cb92951695309c1e98 Mon Sep 17 00:00:00 2001 From: lilin90 Date: Tue, 20 Aug 2024 16:21:41 +0800 Subject: [PATCH 5/7] Update wording for consistency --- 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 aef58e768f392..9d46098217a5e 100644 --- a/tidb-configuration-file.md +++ b/tidb-configuration-file.md @@ -900,7 +900,7 @@ Configuration items related to read isolation. ### `tidb_slow_log_threshold` -- This configuration is used to output the threshold value of the time consumed by the slow log. +- Outputs the threshold value of the time consumed by the slow log. - Default value: `300` - Range: `[-1, 9223372036854775807]` - Unit: Milliseconds From 1a3380edb8d98a63065949a5f4d07b9a371b9d0e Mon Sep 17 00:00:00 2001 From: Lilian Lee Date: Tue, 20 Aug 2024 16:52:55 +0800 Subject: [PATCH 6/7] Apply suggestions from code review Co-authored-by: Grace Cai --- system-variables.md | 2 +- tidb-configuration-file.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/system-variables.md b/system-variables.md index 6650894a13e6c..4b54f0019c9bc 100644 --- a/system-variables.md +++ b/system-variables.md @@ -5258,7 +5258,7 @@ Query OK, 0 rows affected, 1 warning (0.00 sec) - Default value: `300` - Range: `[-1, 9223372036854775807]` - Unit: Milliseconds -- This variable outputs the threshold value of the time consumed by the slow log, and is set to 300 milliseconds by default. When the time consumed by a query is larger than this value, this query is considered as a slow query log and its log is output to the slow query log. Note that when the output level of [`log.level`](https://docs.pingcap.com/tidb/dev/tidb-configuration-file#level) is `"debug"`, all queries are recorded in the slow query log, regardless of the setting of this variable. +- This variable outputs the threshold value of the time consumed by the slow log, and is set to 300 milliseconds by default. When the time consumed by a query is larger than this value, this query is considered as a slow query and its log is output to the slow query log. Note that when the output level of [`log.level`](https://docs.pingcap.com/tidb/dev/tidb-configuration-file#level) is `"debug"`, all queries are recorded in the slow query log, regardless of the setting of this variable. ### tidb_slow_query_file diff --git a/tidb-configuration-file.md b/tidb-configuration-file.md index 9d46098217a5e..f5788bae2873b 100644 --- a/tidb-configuration-file.md +++ b/tidb-configuration-file.md @@ -309,7 +309,7 @@ Configuration items related to log. - Outputs the threshold value of consumed time in the slow log. - Default value: `300` - Unit: Milliseconds -- When the time consumed by a query is larger than this value, this query is considered as a slow query log and its log is output to the slow query log. Note that when the output level of [`log.level`](#level) is `"debug"`, all queries are recorded in the slow query log, regardless of the setting of this parameter. +- When the time consumed by a query is larger than this value, this query is considered as a slow query and its log is output to the slow query log. Note that when the output level of [`log.level`](#level) is `"debug"`, all queries are recorded in the slow query log, regardless of the setting of this parameter. - Since v6.1.0, the threshold value of consumed time in the slow log is specified by the TiDB configuration item [`instance.tidb_slow_log_threshold`](/tidb-configuration-file.md#tidb_slow_log_threshold) or the system variable [`tidb_slow_log_threshold`](/system-variables.md#tidb_slow_log_threshold). `slow-threshold` still takes effect. But if `slow-threshold` and `instance.tidb_slow_log_threshold` are set at the same time, the latter takes effect. ### `record-plan-in-slow-log` @@ -904,7 +904,7 @@ Configuration items related to read isolation. - Default value: `300` - Range: `[-1, 9223372036854775807]` - Unit: Milliseconds -- When the time consumed by a query is larger than this value, this query is considered as a slow query log and its log is output to the slow query log. Note that when the output level of [`log.level`](#level) is `"debug"`, all queries are recorded in the slow query log, regardless of the setting of this parameter. +- When the time consumed by a query is larger than this value, this query is considered as a slow query and its log is output to the slow query log. Note that when the output level of [`log.level`](#level) is `"debug"`, all queries are recorded in the slow query log, regardless of the setting of this parameter. - Before v6.1.0, this configuration is set by `slow-threshold`. ### `in-mem-slow-query-topn-num` New in v7.3.0 From 00a6dcab4d209ca8613a7a847e0b0b67a298b2d8 Mon Sep 17 00:00:00 2001 From: lilin90 Date: Tue, 20 Aug 2024 17:58:55 +0800 Subject: [PATCH 7/7] 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 4b54f0019c9bc..47e60eb008b28 100644 --- a/system-variables.md +++ b/system-variables.md @@ -5258,7 +5258,7 @@ Query OK, 0 rows affected, 1 warning (0.00 sec) - Default value: `300` - Range: `[-1, 9223372036854775807]` - Unit: Milliseconds -- This variable outputs the threshold value of the time consumed by the slow log, and is set to 300 milliseconds by default. When the time consumed by a query is larger than this value, this query is considered as a slow query and its log is output to the slow query log. Note that when the output level of [`log.level`](https://docs.pingcap.com/tidb/dev/tidb-configuration-file#level) is `"debug"`, all queries are recorded in the slow query log, regardless of the setting of this variable. +- This variable outputs the threshold value of the time consumed by the slow log, and is set to 300 milliseconds by default. When the time consumed by a query is larger than this value, this query is considered as a slow query and its log is output to the slow query log. Note that when the output level of [`log.level`](https://docs.pingcap.com/tidb/v8.1/tidb-configuration-file#level) is `"debug"`, all queries are recorded in the slow query log, regardless of the setting of this variable. ### tidb_slow_query_file