From 73c22dc173efdae8f1556312b83edd513f57f8a8 Mon Sep 17 00:00:00 2001 From: qw4990 Date: Wed, 3 Aug 2022 11:14:00 +0800 Subject: [PATCH 01/30] fix ci --- system-variables.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/system-variables.md b/system-variables.md index 05d64efdce163..359b040c24900 100644 --- a/system-variables.md +++ b/system-variables.md @@ -335,6 +335,16 @@ This variable is an alias for `last_insert_id`. > > Unlike in MySQL, the `max_execution_time` system variable currently works on all kinds of statements in TiDB, not only restricted to the `SELECT` statement. The precision of the timeout value is roughly 100ms. This means the statement might not be terminated in accurate milliseconds as you specify. +### max_prepared_stmt_count + +- Scope: GLOBAL +- Persists to cluster: Yes +- Type: Integer +- Default value: `-1` +- Range: `[-1, 1048576]` +- Indicates the maximum number of [`PREPARE` statement](/sql-statements/sql-statement-prepare.md) of a session. +- `-1` means no limitation. + ### plugin_dir - Scope: GLOBAL @@ -996,6 +1006,15 @@ Constraint checking is always performed in place for pessimistic transactions (d - Since v6.1.0, the [Join Reorder](/join-reorder.md) algorithm of TiDB supports Outer Join. This variable controls the support behavior, and the default value is `ON`. - For a cluster upgraded from a version earlier than v6.1.0, the default value is still `TRUE`. +### tidb_enable_ordered_result_mode + +- Scope: SESSION | GLOBAL +- Persists to cluster: Yes +- Default value: `OFF` +- Indicates whether to sort the final output result automatically. +- For example, if enable this feature, TiDB will process `select a, max(b) from t group by a` as `select a, max(b) from t group by a order by a, max(b)`. + + ### tidb_enable_paging New in v5.4.0 - Scope: SESSION | GLOBAL @@ -1638,6 +1657,16 @@ For a system upgraded to v5.0 from an earlier version, if you have not modified - This variable is used to set whether the optimizer executes the optimization operation of pushing down the aggregate function to the position before Join, Projection, and UnionAll. - When the aggregate operation is slow in query, you can set the variable value to ON. +### tidb_opt_cartesian_bcj + +- Scope: SESSION | GLOBAL +- Persists to cluster: YES +- Type: Integer +- Default value: `1` +- Range: `[0, 2]` +- Indicates whether to allow broadcast CARTESIAN join. +- `0` means that it's not allowed, `1` means that it's allow based on `tidb_broadcast_join_threshold_count`, and `2` means it's always allowed even if the table size exceeds the threshold. + ### tidb_opt_correlation_exp_factor - Scope: SESSION | GLOBAL From d700942b66cd1308021a6bbf7f54b9ad80e779d9 Mon Sep 17 00:00:00 2001 From: qw4990 Date: Thu, 11 Aug 2022 18:51:03 +0800 Subject: [PATCH 02/30] fixup --- system-variables.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/system-variables.md b/system-variables.md index 359b040c24900..058f7de8791cc 100644 --- a/system-variables.md +++ b/system-variables.md @@ -1667,6 +1667,14 @@ For a system upgraded to v5.0 from an earlier version, if you have not modified - Indicates whether to allow broadcast CARTESIAN join. - `0` means that it's not allowed, `1` means that it's allow based on `tidb_broadcast_join_threshold_count`, and `2` means it's always allowed even if the table size exceeds the threshold. +### tidb_opt_concurrency_factor + +- Scope: SESSION | GLOBAL +- Persists to cluster: YES +- Type: Float +- Default value: `` + + ### tidb_opt_correlation_exp_factor - Scope: SESSION | GLOBAL From ea8e1c2a4a224611acffcb0ff8ce834d434f5a65 Mon Sep 17 00:00:00 2001 From: qw4990 Date: Thu, 11 Aug 2022 19:10:44 +0800 Subject: [PATCH 03/30] fixup --- system-variables.md | 75 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 74 insertions(+), 1 deletion(-) diff --git a/system-variables.md b/system-variables.md index d1429e3c1b371..22daa55e172c7 100644 --- a/system-variables.md +++ b/system-variables.md @@ -1758,8 +1758,18 @@ For a system upgraded to v5.0 from an earlier version, if you have not modified - Scope: SESSION | GLOBAL - Persists to cluster: YES - Type: Float -- Default value: `` +- Range: `[0, 2147483647]` +- Default value: `3.0` +- Indicates the CPU cost of a Golang goroutine in TiDB. It's used by the [Cost Model](/cost-model.md). + +### tidb_opt_cop_cpu_factor +- Scope: SESSION | GLOBAL +- Persists to cluster: YES +- Type: Float +- Range: `[0, 2147483647]` +- Default value: `3.0` +- Indicates the CPU cost of TiKV Coprocessor to process one row. It's used by the [Cost Model](/cost-model.md). ### tidb_opt_correlation_exp_factor @@ -1783,6 +1793,33 @@ For a system upgraded to v5.0 from an earlier version, if you have not modified - Range: `[0, 1]` - This variable is used to set the threshold value that determines whether to enable estimating the row count by using column order correlation. If the order correlation between the current column and the `handle` column exceeds the threshold value, this method is enabled. +### tidb_opt_cop_cpu_factor + +- Scope: SESSION | GLOBAL +- Persists to cluster: YES +- Type: Float +- Range: `[0, 2147483647]` +- Default value: `3.0` +- Indicates the CPU cost of TiDB to process one row. It's used by the [Cost Model](/cost-model.md). + +### tidb_opt_desc_scan_factor + +- Scope: SESSION | GLOBAL +- Persists to cluster: YES +- Type: Float +- Range: `[0, 2147483647]` +- Default value: `3.0` +- Indicates the cost of TiKV to scan one row in descending order. It's used by the [Cost Model](/cost-model.md). + +### tidb_opt_disk_factor + +- Scope: SESSION | GLOBAL +- Persists to cluster: YES +- Type: Float +- Range: `[0, 2147483647]` +- Default value: `1.5` +- Indicates the I/O cost of TiDB to read/write one byte from/to temporary disk. It's used by the [Cost Model](/cost-model.md). + ### tidb_opt_distinct_agg_push_down - Scope: SESSION @@ -1862,6 +1899,15 @@ mysql> desc select count(distinct a) from test.t; - This variable is used to set the threshold that determines whether to push the Limit or TopN operator down to TiKV. - If the value of the Limit or TopN operator is smaller than or equal to this threshold, these operators are forcibly pushed down to TiKV. This variable resolves the issue that the Limit or TopN operator cannot be pushed down to TiKV partly due to wrong estimation. +### tidb_opt_memory_factor + +- Scope: SESSION | GLOBAL +- Persists to cluster: YES +- Type: Float +- Range: `[0, 2147483647]` +- Default value: `0.001` +- Indicates the memory cost of TiDB to store one row. It's used by the [Cost Model](/cost-model.md). + ### tidb_opt_mpp_outer_join_fixed_build_side New in v5.1.0 - Scope: SESSION | GLOBAL @@ -1870,6 +1916,15 @@ mysql> desc select count(distinct a) from test.t; - Default value: `ON` - Specifies whether to allow using outer table as the build side in outer join for TiFlash. +### tidb_opt_network_factor + +- Scope: SESSION | GLOBAL +- Persists to cluster: YES +- Type: Float +- Range: `[0, 2147483647]` +- Default value: `1.0` +- Indicates the net cost of transferring 1 byte through the network. It's used by the [Cost Model](/cost-model.md). + ### tidb_opt_prefer_range_scan New in v5.0 - Scope: SESSION | GLOBAL @@ -1911,6 +1966,24 @@ explain select * from t where age=5; - Default value: `OFF` - Specifies whether to allow the optimizer to push `Projection` down to the TiKV or TiFlash coprocessor. +### tidb_opt_scan_factor + +- Scope: SESSION | GLOBAL +- Persists to cluster: YES +- Type: Float +- Range: `[0, 2147483647]` +- Default value: `1.5` +- Indicates the cost of TiKV to scan one row in ascending order. It's used by the [Cost Model](/cost-model.md). + +### tidb_opt_seek_factor + +- Scope: SESSION | GLOBAL +- Persists to cluster: YES +- Type: Float +- Range: `[0, 2147483647]` +- Default value: `20` +- Indicates the start-up cost of TiDB to request data from TiKV. It's used by the [Cost Model](/cost-model.md). + ### tidb_opt_skew_distinct_agg New in v6.2.0 > **Note:** From aa8d83252c2b43cd1a6dabe8fa99ca304540adb7 Mon Sep 17 00:00:00 2001 From: qw4990 Date: Thu, 11 Aug 2022 19:14:02 +0800 Subject: [PATCH 04/30] fixup --- system-variables.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/system-variables.md b/system-variables.md index 22daa55e172c7..2ff264f94d7f2 100644 --- a/system-variables.md +++ b/system-variables.md @@ -1760,7 +1760,7 @@ For a system upgraded to v5.0 from an earlier version, if you have not modified - Type: Float - Range: `[0, 2147483647]` - Default value: `3.0` -- Indicates the CPU cost of a Golang goroutine in TiDB. It's used by the [Cost Model](/cost-model.md). +- Indicates the CPU cost of starting a Golang goroutine in TiDB. It's used by the [Cost Model](/cost-model.md). ### tidb_opt_cop_cpu_factor @@ -1793,7 +1793,7 @@ For a system upgraded to v5.0 from an earlier version, if you have not modified - Range: `[0, 1]` - This variable is used to set the threshold value that determines whether to enable estimating the row count by using column order correlation. If the order correlation between the current column and the `handle` column exceeds the threshold value, this method is enabled. -### tidb_opt_cop_cpu_factor +### tidb_opt_cpu_factor - Scope: SESSION | GLOBAL - Persists to cluster: YES @@ -1809,7 +1809,7 @@ For a system upgraded to v5.0 from an earlier version, if you have not modified - Type: Float - Range: `[0, 2147483647]` - Default value: `3.0` -- Indicates the cost of TiKV to scan one row in descending order. It's used by the [Cost Model](/cost-model.md). +- Indicates the cost of TiKV to scan one row from the disk in descending order. It's used by the [Cost Model](/cost-model.md). ### tidb_opt_disk_factor @@ -1818,7 +1818,7 @@ For a system upgraded to v5.0 from an earlier version, if you have not modified - Type: Float - Range: `[0, 2147483647]` - Default value: `1.5` -- Indicates the I/O cost of TiDB to read/write one byte from/to temporary disk. It's used by the [Cost Model](/cost-model.md). +- Indicates the I/O cost of TiDB to read/write one byte from/to the temporary disk. It's used by the [Cost Model](/cost-model.md). ### tidb_opt_distinct_agg_push_down @@ -1973,7 +1973,7 @@ explain select * from t where age=5; - Type: Float - Range: `[0, 2147483647]` - Default value: `1.5` -- Indicates the cost of TiKV to scan one row in ascending order. It's used by the [Cost Model](/cost-model.md). +- Indicates the cost of TiKV to scan one row from the disk in ascending order. It's used by the [Cost Model](/cost-model.md). ### tidb_opt_seek_factor From b8aab3ebc959e3cb783b96393b31f83f7c8e565d Mon Sep 17 00:00:00 2001 From: qw4990 Date: Mon, 15 Aug 2022 16:47:54 +0800 Subject: [PATCH 05/30] address comments --- system-variables.md | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/system-variables.md b/system-variables.md index 2ff264f94d7f2..2f5a01c842b24 100644 --- a/system-variables.md +++ b/system-variables.md @@ -344,6 +344,28 @@ This variable is an alias for `last_insert_id`. - Range: `[-1, 1048576]` - Indicates the maximum number of [`PREPARE` statement](/sql-statements/sql-statement-prepare.md) of a session. - `-1` means no limitation. +- If you set it to a value that exceeds the maximum number, `1048576` will be used: + +```sql +mysql> set global max_prepared_stmt_count=1048577; +Query OK, 0 rows affected, 1 warning (0.01 sec) + +mysql> show warnings; ++---------+------+--------------------------------------------------------------+ +| Level | Code | Message | ++---------+------+--------------------------------------------------------------+ +| Warning | 1292 | Truncated incorrect max_prepared_stmt_count value: '1048577' | ++---------+------+--------------------------------------------------------------+ +1 row in set (0.00 sec) + +mysql> show global variables like 'max_prepared_stmt_count'; ++-------------------------+---------+ +| Variable_name | Value | ++-------------------------+---------+ +| max_prepared_stmt_count | 1048576 | ++-------------------------+---------+ +1 row in set (0.00 sec) +``` ### plugin_dir @@ -1751,7 +1773,7 @@ For a system upgraded to v5.0 from an earlier version, if you have not modified - Default value: `1` - Range: `[0, 2]` - Indicates whether to allow broadcast CARTESIAN join. -- `0` means that it's not allowed, `1` means that it's allow based on `tidb_broadcast_join_threshold_count`, and `2` means it's always allowed even if the table size exceeds the threshold. +- `0` means that it's not allowed, `1` means that it's allowed based on `tidb_broadcast_join_threshold_count`, and `2` means it's always allowed even if the table size exceeds the threshold. ### tidb_opt_concurrency_factor From ab89763916c11b55b244e15aaaf4d7bd36112993 Mon Sep 17 00:00:00 2001 From: Yuanjia Zhang Date: Tue, 16 Aug 2022 15:23:41 +0800 Subject: [PATCH 06/30] Update system-variables.md Co-authored-by: TomShawn <41534398+TomShawn@users.noreply.github.com> --- system-variables.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system-variables.md b/system-variables.md index 2f5a01c842b24..ca4750b020b6a 100644 --- a/system-variables.md +++ b/system-variables.md @@ -343,7 +343,7 @@ This variable is an alias for `last_insert_id`. - Default value: `-1` - Range: `[-1, 1048576]` - Indicates the maximum number of [`PREPARE` statement](/sql-statements/sql-statement-prepare.md) of a session. -- `-1` means no limitation. +- The value of `-1` means no limit on the maximum number of `PREPARE` statements in a session. - If you set it to a value that exceeds the maximum number, `1048576` will be used: ```sql From b77e6c2c3a798d83e02a4028a4aa450476f7e422 Mon Sep 17 00:00:00 2001 From: Yuanjia Zhang Date: Tue, 16 Aug 2022 15:23:50 +0800 Subject: [PATCH 07/30] Update system-variables.md Co-authored-by: TomShawn <41534398+TomShawn@users.noreply.github.com> --- system-variables.md | 1 - 1 file changed, 1 deletion(-) diff --git a/system-variables.md b/system-variables.md index ca4750b020b6a..cb14e40648108 100644 --- a/system-variables.md +++ b/system-variables.md @@ -1093,7 +1093,6 @@ Constraint checking is always performed in place for pessimistic transactions (d - Indicates whether to sort the final output result automatically. - For example, if enable this feature, TiDB will process `select a, max(b) from t group by a` as `select a, max(b) from t group by a order by a, max(b)`. - ### tidb_enable_paging New in v5.4.0 - Scope: SESSION | GLOBAL From fe0b085e11834a33bbdd73b7abd9e94dacf1eea9 Mon Sep 17 00:00:00 2001 From: Yuanjia Zhang Date: Tue, 16 Aug 2022 15:23:57 +0800 Subject: [PATCH 08/30] Update system-variables.md Co-authored-by: TomShawn <41534398+TomShawn@users.noreply.github.com> --- system-variables.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system-variables.md b/system-variables.md index cb14e40648108..acd96fa730f28 100644 --- a/system-variables.md +++ b/system-variables.md @@ -342,7 +342,7 @@ This variable is an alias for `last_insert_id`. - Type: Integer - Default value: `-1` - Range: `[-1, 1048576]` -- Indicates the maximum number of [`PREPARE` statement](/sql-statements/sql-statement-prepare.md) of a session. +- Specifies the maximum number of [`PREPARE`](/sql-statements/sql-statement-prepare.md) statements in a session. - The value of `-1` means no limit on the maximum number of `PREPARE` statements in a session. - If you set it to a value that exceeds the maximum number, `1048576` will be used: From a39e5d6bacc884319f88acd18e79277e85f64f9a Mon Sep 17 00:00:00 2001 From: Yuanjia Zhang Date: Tue, 16 Aug 2022 15:24:04 +0800 Subject: [PATCH 09/30] Update system-variables.md Co-authored-by: TomShawn <41534398+TomShawn@users.noreply.github.com> --- system-variables.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system-variables.md b/system-variables.md index acd96fa730f28..05be9a2edf099 100644 --- a/system-variables.md +++ b/system-variables.md @@ -344,7 +344,7 @@ This variable is an alias for `last_insert_id`. - Range: `[-1, 1048576]` - Specifies the maximum number of [`PREPARE`](/sql-statements/sql-statement-prepare.md) statements in a session. - The value of `-1` means no limit on the maximum number of `PREPARE` statements in a session. -- If you set it to a value that exceeds the maximum number, `1048576` will be used: +- If you set the variable to a value that exceeds the upper limit `1048576`, `1048576` is used instead: ```sql mysql> set global max_prepared_stmt_count=1048577; From 84cd8670536ebc9fdea7293554599a44b445f934 Mon Sep 17 00:00:00 2001 From: Yuanjia Zhang Date: Tue, 16 Aug 2022 15:24:10 +0800 Subject: [PATCH 10/30] Update system-variables.md Co-authored-by: TomShawn <41534398+TomShawn@users.noreply.github.com> --- system-variables.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system-variables.md b/system-variables.md index 05be9a2edf099..3fd728be54c4b 100644 --- a/system-variables.md +++ b/system-variables.md @@ -347,7 +347,7 @@ This variable is an alias for `last_insert_id`. - If you set the variable to a value that exceeds the upper limit `1048576`, `1048576` is used instead: ```sql -mysql> set global max_prepared_stmt_count=1048577; +mysql> SET GLOBAL max_prepared_stmt_count=1048577; Query OK, 0 rows affected, 1 warning (0.01 sec) mysql> show warnings; From 59a8c2d133c7c995ee4b93915b65fe64d20189b4 Mon Sep 17 00:00:00 2001 From: Yuanjia Zhang Date: Tue, 16 Aug 2022 15:24:16 +0800 Subject: [PATCH 11/30] Update system-variables.md Co-authored-by: TomShawn <41534398+TomShawn@users.noreply.github.com> --- system-variables.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system-variables.md b/system-variables.md index 3fd728be54c4b..ce4614633f856 100644 --- a/system-variables.md +++ b/system-variables.md @@ -350,7 +350,7 @@ This variable is an alias for `last_insert_id`. mysql> SET GLOBAL max_prepared_stmt_count=1048577; Query OK, 0 rows affected, 1 warning (0.01 sec) -mysql> show warnings; +mysql> SHOW WARNINGS; +---------+------+--------------------------------------------------------------+ | Level | Code | Message | +---------+------+--------------------------------------------------------------+ From 7e8ca8826b252d65cb978a106c7767d47a76426e Mon Sep 17 00:00:00 2001 From: Yuanjia Zhang Date: Tue, 16 Aug 2022 15:24:21 +0800 Subject: [PATCH 12/30] Update system-variables.md Co-authored-by: TomShawn <41534398+TomShawn@users.noreply.github.com> --- system-variables.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system-variables.md b/system-variables.md index ce4614633f856..0e464073ca6d6 100644 --- a/system-variables.md +++ b/system-variables.md @@ -1944,7 +1944,7 @@ mysql> desc select count(distinct a) from test.t; - Type: Float - Range: `[0, 2147483647]` - Default value: `1.0` -- Indicates the net cost of transferring 1 byte through the network. It's used by the [Cost Model](/cost-model.md). +- Indicates the net cost of transferring 1 byte of data through the network. This variable is internally used in the [Cost Model](/cost-model.md). ### tidb_opt_prefer_range_scan New in v5.0 From 3b8a5c9056117efba60979953d7065b10e8cc0a3 Mon Sep 17 00:00:00 2001 From: Yuanjia Zhang Date: Tue, 16 Aug 2022 15:24:28 +0800 Subject: [PATCH 13/30] Update system-variables.md Co-authored-by: TomShawn <41534398+TomShawn@users.noreply.github.com> --- system-variables.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system-variables.md b/system-variables.md index 0e464073ca6d6..89f64ea739f76 100644 --- a/system-variables.md +++ b/system-variables.md @@ -1994,7 +1994,7 @@ explain select * from t where age=5; - Type: Float - Range: `[0, 2147483647]` - Default value: `1.5` -- Indicates the cost of TiKV to scan one row from the disk in ascending order. It's used by the [Cost Model](/cost-model.md). +- Indicates the cost for TiKV to scan one row of data from the disk in ascending order. This variable is internally used in the [Cost Model](/cost-model.md). ### tidb_opt_seek_factor From eb3554feb29c29a01c027f31bcd530544ee3daeb Mon Sep 17 00:00:00 2001 From: Yuanjia Zhang Date: Tue, 16 Aug 2022 15:24:33 +0800 Subject: [PATCH 14/30] Update system-variables.md Co-authored-by: TomShawn <41534398+TomShawn@users.noreply.github.com> --- system-variables.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system-variables.md b/system-variables.md index 89f64ea739f76..c3cf609a4f947 100644 --- a/system-variables.md +++ b/system-variables.md @@ -2003,7 +2003,7 @@ explain select * from t where age=5; - Type: Float - Range: `[0, 2147483647]` - Default value: `20` -- Indicates the start-up cost of TiDB to request data from TiKV. It's used by the [Cost Model](/cost-model.md). +- Indicates the start-up cost for TiDB to request data from TiKV. This variable is internally used in the [Cost Model](/cost-model.md). ### tidb_opt_skew_distinct_agg New in v6.2.0 From 4797be3b7cd5137e1e357d205e7021741ea34941 Mon Sep 17 00:00:00 2001 From: Yuanjia Zhang Date: Tue, 16 Aug 2022 15:24:41 +0800 Subject: [PATCH 15/30] Update system-variables.md Co-authored-by: TomShawn <41534398+TomShawn@users.noreply.github.com> --- system-variables.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system-variables.md b/system-variables.md index c3cf609a4f947..362474eb1cba1 100644 --- a/system-variables.md +++ b/system-variables.md @@ -1090,7 +1090,7 @@ Constraint checking is always performed in place for pessimistic transactions (d - Scope: SESSION | GLOBAL - Persists to cluster: Yes - Default value: `OFF` -- Indicates whether to sort the final output result automatically. +- Specifies whether to sort the final output result automatically. - For example, if enable this feature, TiDB will process `select a, max(b) from t group by a` as `select a, max(b) from t group by a order by a, max(b)`. ### tidb_enable_paging New in v5.4.0 From ac5fed65b485e74b7145377bb44dd596425909a7 Mon Sep 17 00:00:00 2001 From: Yuanjia Zhang Date: Tue, 16 Aug 2022 15:24:51 +0800 Subject: [PATCH 16/30] Update system-variables.md Co-authored-by: TomShawn <41534398+TomShawn@users.noreply.github.com> --- system-variables.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system-variables.md b/system-variables.md index 362474eb1cba1..bc6e69a4dbe2c 100644 --- a/system-variables.md +++ b/system-variables.md @@ -1091,7 +1091,7 @@ Constraint checking is always performed in place for pessimistic transactions (d - Persists to cluster: Yes - Default value: `OFF` - Specifies whether to sort the final output result automatically. -- For example, if enable this feature, TiDB will process `select a, max(b) from t group by a` as `select a, max(b) from t group by a order by a, max(b)`. +- For example, with this variable enabled, TiDB processes `SELECT a, MAX(b) FROM t GROUP BY a` as `SELECT a, MAX(b) FROM t GROUP BY a ORDER BY a, MAX(b)`. ### tidb_enable_paging New in v5.4.0 From 458b49f8e60e69c1d09d172da84bedc5ed0ee464 Mon Sep 17 00:00:00 2001 From: Yuanjia Zhang Date: Tue, 16 Aug 2022 15:25:01 +0800 Subject: [PATCH 17/30] Update system-variables.md Co-authored-by: TomShawn <41534398+TomShawn@users.noreply.github.com> --- system-variables.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system-variables.md b/system-variables.md index bc6e69a4dbe2c..d3ebe7db69e65 100644 --- a/system-variables.md +++ b/system-variables.md @@ -358,7 +358,7 @@ mysql> SHOW WARNINGS; +---------+------+--------------------------------------------------------------+ 1 row in set (0.00 sec) -mysql> show global variables like 'max_prepared_stmt_count'; +mysql> SHOW GLOBAL VARIABLES LIKE 'max_prepared_stmt_count'; +-------------------------+---------+ | Variable_name | Value | +-------------------------+---------+ From 8ff4b800d1085705e9d97b87d4a7bb20ff69ac26 Mon Sep 17 00:00:00 2001 From: Yuanjia Zhang Date: Tue, 16 Aug 2022 15:25:16 +0800 Subject: [PATCH 18/30] Update system-variables.md Co-authored-by: TomShawn <41534398+TomShawn@users.noreply.github.com> --- system-variables.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system-variables.md b/system-variables.md index d3ebe7db69e65..b8e308250f8d7 100644 --- a/system-variables.md +++ b/system-variables.md @@ -1771,7 +1771,7 @@ For a system upgraded to v5.0 from an earlier version, if you have not modified - Type: Integer - Default value: `1` - Range: `[0, 2]` -- Indicates whether to allow broadcast CARTESIAN join. +- Indicates whether to allow the broadcast CARTESIAN join. - `0` means that it's not allowed, `1` means that it's allowed based on `tidb_broadcast_join_threshold_count`, and `2` means it's always allowed even if the table size exceeds the threshold. ### tidb_opt_concurrency_factor From a60c19963f12ca884399ac4b8137e126b35daf9e Mon Sep 17 00:00:00 2001 From: Yuanjia Zhang Date: Tue, 16 Aug 2022 15:25:25 +0800 Subject: [PATCH 19/30] Update system-variables.md Co-authored-by: TomShawn <41534398+TomShawn@users.noreply.github.com> --- system-variables.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system-variables.md b/system-variables.md index b8e308250f8d7..2731fca620e45 100644 --- a/system-variables.md +++ b/system-variables.md @@ -1772,7 +1772,7 @@ For a system upgraded to v5.0 from an earlier version, if you have not modified - Default value: `1` - Range: `[0, 2]` - Indicates whether to allow the broadcast CARTESIAN join. -- `0` means that it's not allowed, `1` means that it's allowed based on `tidb_broadcast_join_threshold_count`, and `2` means it's always allowed even if the table size exceeds the threshold. +- `0` means that the broadcast CARTESIAN join is not allowed. `1` means that it is allowed based on [`tidb_broadcast_join_threshold_count`](#tidb_broadcast_join_threshold_count-new-in-v50). `2` means that it is always allowed even if the table size exceeds the threshold. ### tidb_opt_concurrency_factor From 9affe1d1350e9fc9846f2d262541086a8225a36f Mon Sep 17 00:00:00 2001 From: Yuanjia Zhang Date: Tue, 16 Aug 2022 15:25:34 +0800 Subject: [PATCH 20/30] Update system-variables.md Co-authored-by: TomShawn <41534398+TomShawn@users.noreply.github.com> --- system-variables.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system-variables.md b/system-variables.md index 2731fca620e45..5c387f4d8db30 100644 --- a/system-variables.md +++ b/system-variables.md @@ -1781,7 +1781,7 @@ For a system upgraded to v5.0 from an earlier version, if you have not modified - Type: Float - Range: `[0, 2147483647]` - Default value: `3.0` -- Indicates the CPU cost of starting a Golang goroutine in TiDB. It's used by the [Cost Model](/cost-model.md). +- Indicates the CPU cost of starting a Golang goroutine in TiDB. This variable is internally used in the [Cost Model](/cost-model.md). ### tidb_opt_cop_cpu_factor From 0f08d6e8ce7913a24b9fc0b3673b4062d93825b1 Mon Sep 17 00:00:00 2001 From: Yuanjia Zhang Date: Tue, 16 Aug 2022 15:25:45 +0800 Subject: [PATCH 21/30] Update system-variables.md Co-authored-by: TomShawn <41534398+TomShawn@users.noreply.github.com> --- system-variables.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system-variables.md b/system-variables.md index 5c387f4d8db30..8036fe9edb4d5 100644 --- a/system-variables.md +++ b/system-variables.md @@ -1790,7 +1790,7 @@ For a system upgraded to v5.0 from an earlier version, if you have not modified - Type: Float - Range: `[0, 2147483647]` - Default value: `3.0` -- Indicates the CPU cost of TiKV Coprocessor to process one row. It's used by the [Cost Model](/cost-model.md). +- Indicates the CPU cost for TiKV Coprocessor to process one row. This variable is internally used in the [Cost Model](/cost-model.md). ### tidb_opt_correlation_exp_factor From d0f5d3c7df65be7ec6c8f031fb4716db2e1c6f20 Mon Sep 17 00:00:00 2001 From: Yuanjia Zhang Date: Tue, 16 Aug 2022 15:25:57 +0800 Subject: [PATCH 22/30] Update system-variables.md Co-authored-by: TomShawn <41534398+TomShawn@users.noreply.github.com> --- system-variables.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system-variables.md b/system-variables.md index 8036fe9edb4d5..030a57e569d22 100644 --- a/system-variables.md +++ b/system-variables.md @@ -1839,7 +1839,7 @@ For a system upgraded to v5.0 from an earlier version, if you have not modified - Type: Float - Range: `[0, 2147483647]` - Default value: `1.5` -- Indicates the I/O cost of TiDB to read/write one byte from/to the temporary disk. It's used by the [Cost Model](/cost-model.md). +- Indicates the I/O cost for TiDB to read or write one byte of data from or to the temporary disk. This variable is internally used in the [Cost Model](/cost-model.md). ### tidb_opt_distinct_agg_push_down From 4c2d1b7581682f0a010535294c87942101e3fae0 Mon Sep 17 00:00:00 2001 From: Yuanjia Zhang Date: Tue, 16 Aug 2022 15:26:11 +0800 Subject: [PATCH 23/30] Update system-variables.md Co-authored-by: TomShawn <41534398+TomShawn@users.noreply.github.com> --- system-variables.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system-variables.md b/system-variables.md index 030a57e569d22..705c19b59e110 100644 --- a/system-variables.md +++ b/system-variables.md @@ -1927,7 +1927,7 @@ mysql> desc select count(distinct a) from test.t; - Type: Float - Range: `[0, 2147483647]` - Default value: `0.001` -- Indicates the memory cost of TiDB to store one row. It's used by the [Cost Model](/cost-model.md). +- Indicates the memory cost for TiDB to store one row. This variable is internally used in the [Cost Model](/cost-model.md). ### tidb_opt_mpp_outer_join_fixed_build_side New in v5.1.0 From efae50dee4376e8ba8efbb9de64b6699b9bcb35f Mon Sep 17 00:00:00 2001 From: Yuanjia Zhang Date: Tue, 16 Aug 2022 15:26:19 +0800 Subject: [PATCH 24/30] Update system-variables.md Co-authored-by: TomShawn <41534398+TomShawn@users.noreply.github.com> --- system-variables.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system-variables.md b/system-variables.md index 705c19b59e110..abfb8bef6f5f0 100644 --- a/system-variables.md +++ b/system-variables.md @@ -1821,7 +1821,7 @@ For a system upgraded to v5.0 from an earlier version, if you have not modified - Type: Float - Range: `[0, 2147483647]` - Default value: `3.0` -- Indicates the CPU cost of TiDB to process one row. It's used by the [Cost Model](/cost-model.md). +- Indicates the CPU cost for TiDB to process one row. This variable is internally used in the [Cost Model](/cost-model.md). ### tidb_opt_desc_scan_factor From 45631c992300e62996983acd3e2ac20166801b58 Mon Sep 17 00:00:00 2001 From: Yuanjia Zhang Date: Tue, 16 Aug 2022 15:26:28 +0800 Subject: [PATCH 25/30] Update system-variables.md Co-authored-by: TomShawn <41534398+TomShawn@users.noreply.github.com> --- system-variables.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system-variables.md b/system-variables.md index abfb8bef6f5f0..e44e4e4b681d4 100644 --- a/system-variables.md +++ b/system-variables.md @@ -1830,7 +1830,7 @@ For a system upgraded to v5.0 from an earlier version, if you have not modified - Type: Float - Range: `[0, 2147483647]` - Default value: `3.0` -- Indicates the cost of TiKV to scan one row from the disk in descending order. It's used by the [Cost Model](/cost-model.md). +- Indicates the cost for TiKV to scan one row from the disk in descending order. This variable is internally used in the [Cost Model](/cost-model.md). ### tidb_opt_disk_factor From 7454a40bd26fe3cdb1ab4c6804977d98abac5e52 Mon Sep 17 00:00:00 2001 From: TomShawn <41534398+TomShawn@users.noreply.github.com> Date: Tue, 16 Aug 2022 16:50:50 +0800 Subject: [PATCH 26/30] Apply suggestions from code review --- system-variables.md | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/system-variables.md b/system-variables.md index e44e4e4b681d4..114cb279e01fa 100644 --- a/system-variables.md +++ b/system-variables.md @@ -1773,6 +1773,7 @@ For a system upgraded to v5.0 from an earlier version, if you have not modified - Range: `[0, 2]` - Indicates whether to allow the broadcast CARTESIAN join. - `0` means that the broadcast CARTESIAN join is not allowed. `1` means that it is allowed based on [`tidb_broadcast_join_threshold_count`](#tidb_broadcast_join_threshold_count-new-in-v50). `2` means that it is always allowed even if the table size exceeds the threshold. +- This variable is internally used in TiDB, and it is not recommended to modify its value. ### tidb_opt_concurrency_factor @@ -1781,7 +1782,7 @@ For a system upgraded to v5.0 from an earlier version, if you have not modified - Type: Float - Range: `[0, 2147483647]` - Default value: `3.0` -- Indicates the CPU cost of starting a Golang goroutine in TiDB. This variable is internally used in the [Cost Model](/cost-model.md). +- Indicates the CPU cost of starting a Golang goroutine in TiDB. This variable is internally used in the [Cost Model](/cost-model.md), and it is not recommended to modify its value. ### tidb_opt_cop_cpu_factor @@ -1790,7 +1791,7 @@ For a system upgraded to v5.0 from an earlier version, if you have not modified - Type: Float - Range: `[0, 2147483647]` - Default value: `3.0` -- Indicates the CPU cost for TiKV Coprocessor to process one row. This variable is internally used in the [Cost Model](/cost-model.md). +- Indicates the CPU cost for TiKV Coprocessor to process one row. This variable is internally used in the [Cost Model](/cost-model.md), and it is not recommended to modify its value. ### tidb_opt_correlation_exp_factor @@ -1821,7 +1822,7 @@ For a system upgraded to v5.0 from an earlier version, if you have not modified - Type: Float - Range: `[0, 2147483647]` - Default value: `3.0` -- Indicates the CPU cost for TiDB to process one row. This variable is internally used in the [Cost Model](/cost-model.md). +- Indicates the CPU cost for TiDB to process one row. This variable is internally used in the [Cost Model](/cost-model.md), and it is not recommended to modify its value. ### tidb_opt_desc_scan_factor @@ -1830,7 +1831,7 @@ For a system upgraded to v5.0 from an earlier version, if you have not modified - Type: Float - Range: `[0, 2147483647]` - Default value: `3.0` -- Indicates the cost for TiKV to scan one row from the disk in descending order. This variable is internally used in the [Cost Model](/cost-model.md). +- Indicates the cost for TiKV to scan one row from the disk in descending order. This variable is internally used in the [Cost Model](/cost-model.md), and it is not recommended to modify its value. ### tidb_opt_disk_factor @@ -1839,7 +1840,7 @@ For a system upgraded to v5.0 from an earlier version, if you have not modified - Type: Float - Range: `[0, 2147483647]` - Default value: `1.5` -- Indicates the I/O cost for TiDB to read or write one byte of data from or to the temporary disk. This variable is internally used in the [Cost Model](/cost-model.md). +- Indicates the I/O cost for TiDB to read or write one byte of data from or to the temporary disk. This variable is internally used in the [Cost Model](/cost-model.md), and it is not recommended to modify its value. ### tidb_opt_distinct_agg_push_down @@ -1927,7 +1928,7 @@ mysql> desc select count(distinct a) from test.t; - Type: Float - Range: `[0, 2147483647]` - Default value: `0.001` -- Indicates the memory cost for TiDB to store one row. This variable is internally used in the [Cost Model](/cost-model.md). +- Indicates the memory cost for TiDB to store one row. This variable is internally used in the [Cost Model](/cost-model.md), and it is not recommended to modify its value. ### tidb_opt_mpp_outer_join_fixed_build_side New in v5.1.0 @@ -1944,7 +1945,7 @@ mysql> desc select count(distinct a) from test.t; - Type: Float - Range: `[0, 2147483647]` - Default value: `1.0` -- Indicates the net cost of transferring 1 byte of data through the network. This variable is internally used in the [Cost Model](/cost-model.md). +- Indicates the net cost of transferring 1 byte of data through the network. This variable is internally used in the [Cost Model](/cost-model.md), and it is not recommended to modify its value. ### tidb_opt_prefer_range_scan New in v5.0 @@ -1994,7 +1995,7 @@ explain select * from t where age=5; - Type: Float - Range: `[0, 2147483647]` - Default value: `1.5` -- Indicates the cost for TiKV to scan one row of data from the disk in ascending order. This variable is internally used in the [Cost Model](/cost-model.md). +- Indicates the cost for TiKV to scan one row of data from the disk in ascending order. This variable is internally used in the [Cost Model](/cost-model.md), and it is not recommended to modify its value. ### tidb_opt_seek_factor @@ -2003,7 +2004,7 @@ explain select * from t where age=5; - Type: Float - Range: `[0, 2147483647]` - Default value: `20` -- Indicates the start-up cost for TiDB to request data from TiKV. This variable is internally used in the [Cost Model](/cost-model.md). +- Indicates the start-up cost for TiDB to request data from TiKV. This variable is internally used in the [Cost Model](/cost-model.md), and it is not recommended to modify its value. ### tidb_opt_skew_distinct_agg New in v6.2.0 From c6d981c7ab18031b428f7982a3762d59bfaeecb1 Mon Sep 17 00:00:00 2001 From: TomShawn <41534398+TomShawn@users.noreply.github.com> Date: Tue, 16 Aug 2022 17:58:34 +0800 Subject: [PATCH 27/30] 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 114cb279e01fa..47fb2a4187720 100644 --- a/system-variables.md +++ b/system-variables.md @@ -342,7 +342,7 @@ This variable is an alias for `last_insert_id`. - Type: Integer - Default value: `-1` - Range: `[-1, 1048576]` -- Specifies the maximum number of [`PREPARE`](/sql-statements/sql-statement-prepare.md) statements in a session. +- Specifies the maximum number of [`PREPARE`](/sql-statements/sql-statement-prepare.md) statements in a session. - The value of `-1` means no limit on the maximum number of `PREPARE` statements in a session. - If you set the variable to a value that exceeds the upper limit `1048576`, `1048576` is used instead: From 1eac2a8e4167dbb3b4145875c36075ae6caa2611 Mon Sep 17 00:00:00 2001 From: Yuanjia Zhang Date: Wed, 17 Aug 2022 12:31:27 +0800 Subject: [PATCH 28/30] Update system-variables.md Co-authored-by: TomShawn <41534398+TomShawn@users.noreply.github.com> --- system-variables.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system-variables.md b/system-variables.md index 47fb2a4187720..1c6c66f106f8d 100644 --- a/system-variables.md +++ b/system-variables.md @@ -1772,7 +1772,7 @@ For a system upgraded to v5.0 from an earlier version, if you have not modified - Default value: `1` - Range: `[0, 2]` - Indicates whether to allow the broadcast CARTESIAN join. -- `0` means that the broadcast CARTESIAN join is not allowed. `1` means that it is allowed based on [`tidb_broadcast_join_threshold_count`](#tidb_broadcast_join_threshold_count-new-in-v50). `2` means that it is always allowed even if the table size exceeds the threshold. +- `0` means that the Broadcast Cartesian Join is not allowed. `1` means that it is allowed based on [`tidb_broadcast_join_threshold_count`](#tidb_broadcast_join_threshold_count-new-in-v50). `2` means that it is always allowed even if the table size exceeds the threshold. - This variable is internally used in TiDB, and it is not recommended to modify its value. ### tidb_opt_concurrency_factor From 94a4398e268e7693687c08f1b1095ffffaebd2cf Mon Sep 17 00:00:00 2001 From: Yuanjia Zhang Date: Wed, 17 Aug 2022 12:31:33 +0800 Subject: [PATCH 29/30] Update system-variables.md Co-authored-by: TomShawn <41534398+TomShawn@users.noreply.github.com> --- system-variables.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system-variables.md b/system-variables.md index 1c6c66f106f8d..7bbf959ce6a29 100644 --- a/system-variables.md +++ b/system-variables.md @@ -1771,7 +1771,7 @@ For a system upgraded to v5.0 from an earlier version, if you have not modified - Type: Integer - Default value: `1` - Range: `[0, 2]` -- Indicates whether to allow the broadcast CARTESIAN join. +- Indicates whether to allow the Broadcast Cartesian Join. - `0` means that the Broadcast Cartesian Join is not allowed. `1` means that it is allowed based on [`tidb_broadcast_join_threshold_count`](#tidb_broadcast_join_threshold_count-new-in-v50). `2` means that it is always allowed even if the table size exceeds the threshold. - This variable is internally used in TiDB, and it is not recommended to modify its value. From 676a4581b18bed0a45e65728928161ff4df06ce7 Mon Sep 17 00:00:00 2001 From: TomShawn <41534398+TomShawn@users.noreply.github.com> Date: Thu, 18 Aug 2022 15:19:58 +0800 Subject: [PATCH 30/30] Apply suggestions from code review Co-authored-by: Aolin --- system-variables.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/system-variables.md b/system-variables.md index 7bbf959ce6a29..4c4a37a3a7ba7 100644 --- a/system-variables.md +++ b/system-variables.md @@ -347,7 +347,7 @@ This variable is an alias for `last_insert_id`. - If you set the variable to a value that exceeds the upper limit `1048576`, `1048576` is used instead: ```sql -mysql> SET GLOBAL max_prepared_stmt_count=1048577; +mysql> SET GLOBAL max_prepared_stmt_count = 1048577; Query OK, 0 rows affected, 1 warning (0.01 sec) mysql> SHOW WARNINGS; @@ -1773,7 +1773,7 @@ For a system upgraded to v5.0 from an earlier version, if you have not modified - Range: `[0, 2]` - Indicates whether to allow the Broadcast Cartesian Join. - `0` means that the Broadcast Cartesian Join is not allowed. `1` means that it is allowed based on [`tidb_broadcast_join_threshold_count`](#tidb_broadcast_join_threshold_count-new-in-v50). `2` means that it is always allowed even if the table size exceeds the threshold. -- This variable is internally used in TiDB, and it is not recommended to modify its value. +- This variable is internally used in TiDB, and it is **NOT** recommended to modify its value. ### tidb_opt_concurrency_factor @@ -1782,7 +1782,7 @@ For a system upgraded to v5.0 from an earlier version, if you have not modified - Type: Float - Range: `[0, 2147483647]` - Default value: `3.0` -- Indicates the CPU cost of starting a Golang goroutine in TiDB. This variable is internally used in the [Cost Model](/cost-model.md), and it is not recommended to modify its value. +- Indicates the CPU cost of starting a Golang goroutine in TiDB. This variable is internally used in the [Cost Model](/cost-model.md), and it is **NOT** recommended to modify its value. ### tidb_opt_cop_cpu_factor @@ -1791,7 +1791,7 @@ For a system upgraded to v5.0 from an earlier version, if you have not modified - Type: Float - Range: `[0, 2147483647]` - Default value: `3.0` -- Indicates the CPU cost for TiKV Coprocessor to process one row. This variable is internally used in the [Cost Model](/cost-model.md), and it is not recommended to modify its value. +- Indicates the CPU cost for TiKV Coprocessor to process one row. This variable is internally used in the [Cost Model](/cost-model.md), and it is **NOT** recommended to modify its value. ### tidb_opt_correlation_exp_factor @@ -1822,7 +1822,7 @@ For a system upgraded to v5.0 from an earlier version, if you have not modified - Type: Float - Range: `[0, 2147483647]` - Default value: `3.0` -- Indicates the CPU cost for TiDB to process one row. This variable is internally used in the [Cost Model](/cost-model.md), and it is not recommended to modify its value. +- Indicates the CPU cost for TiDB to process one row. This variable is internally used in the [Cost Model](/cost-model.md), and it is **NOT** recommended to modify its value. ### tidb_opt_desc_scan_factor @@ -1831,7 +1831,7 @@ For a system upgraded to v5.0 from an earlier version, if you have not modified - Type: Float - Range: `[0, 2147483647]` - Default value: `3.0` -- Indicates the cost for TiKV to scan one row from the disk in descending order. This variable is internally used in the [Cost Model](/cost-model.md), and it is not recommended to modify its value. +- Indicates the cost for TiKV to scan one row from the disk in descending order. This variable is internally used in the [Cost Model](/cost-model.md), and it is **NOT** recommended to modify its value. ### tidb_opt_disk_factor @@ -1840,7 +1840,7 @@ For a system upgraded to v5.0 from an earlier version, if you have not modified - Type: Float - Range: `[0, 2147483647]` - Default value: `1.5` -- Indicates the I/O cost for TiDB to read or write one byte of data from or to the temporary disk. This variable is internally used in the [Cost Model](/cost-model.md), and it is not recommended to modify its value. +- Indicates the I/O cost for TiDB to read or write one byte of data from or to the temporary disk. This variable is internally used in the [Cost Model](/cost-model.md), and it is **NOT** recommended to modify its value. ### tidb_opt_distinct_agg_push_down @@ -1928,7 +1928,7 @@ mysql> desc select count(distinct a) from test.t; - Type: Float - Range: `[0, 2147483647]` - Default value: `0.001` -- Indicates the memory cost for TiDB to store one row. This variable is internally used in the [Cost Model](/cost-model.md), and it is not recommended to modify its value. +- Indicates the memory cost for TiDB to store one row. This variable is internally used in the [Cost Model](/cost-model.md), and it is **NOT** recommended to modify its value. ### tidb_opt_mpp_outer_join_fixed_build_side New in v5.1.0 @@ -1945,7 +1945,7 @@ mysql> desc select count(distinct a) from test.t; - Type: Float - Range: `[0, 2147483647]` - Default value: `1.0` -- Indicates the net cost of transferring 1 byte of data through the network. This variable is internally used in the [Cost Model](/cost-model.md), and it is not recommended to modify its value. +- Indicates the net cost of transferring 1 byte of data through the network. This variable is internally used in the [Cost Model](/cost-model.md), and it is **NOT** recommended to modify its value. ### tidb_opt_prefer_range_scan New in v5.0 @@ -1995,7 +1995,7 @@ explain select * from t where age=5; - Type: Float - Range: `[0, 2147483647]` - Default value: `1.5` -- Indicates the cost for TiKV to scan one row of data from the disk in ascending order. This variable is internally used in the [Cost Model](/cost-model.md), and it is not recommended to modify its value. +- Indicates the cost for TiKV to scan one row of data from the disk in ascending order. This variable is internally used in the [Cost Model](/cost-model.md), and it is **NOT** recommended to modify its value. ### tidb_opt_seek_factor @@ -2004,7 +2004,7 @@ explain select * from t where age=5; - Type: Float - Range: `[0, 2147483647]` - Default value: `20` -- Indicates the start-up cost for TiDB to request data from TiKV. This variable is internally used in the [Cost Model](/cost-model.md), and it is not recommended to modify its value. +- Indicates the start-up cost for TiDB to request data from TiKV. This variable is internally used in the [Cost Model](/cost-model.md), and it is **NOT** recommended to modify its value. ### tidb_opt_skew_distinct_agg New in v6.2.0