From 9fc5a02f4710a4752f8e9c33f6be1ebf6f171575 Mon Sep 17 00:00:00 2001 From: tpp Date: Sun, 13 Apr 2025 15:47:34 -0700 Subject: [PATCH 1/5] planner: add optimizer cost factors --- system-variables.md | 153 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 153 insertions(+) diff --git a/system-variables.md b/system-variables.md index 2503cefc4ea41..d1728baa03e63 100644 --- a/system-variables.md +++ b/system-variables.md @@ -4890,6 +4890,159 @@ SHOW WARNINGS; - Default value: `OFF` - This variable is used to control whether to allow `INSERT`, `REPLACE`, and `UPDATE` statements to operate on the `_tidb_rowid` column. This variable can be used only when you import data using TiDB tools. +### tidb_opt_hash_agg_cost_factor New in v9.0.0 + +- Scope: SESSION | GLOBAL +- Applies to hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value): Yes +- Type: Float +- Range: `[0, 2147483647]` +- Default value: `1` +- This variable is internally used in the Cost Model, and it is NOT recommended to modify its value unless directed by TiDB Optimizer Engineering. + +### tidb_opt_hash_join_cost_factor New in v9.0.0 + +- Scope: SESSION | GLOBAL +- Applies to hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value): Yes +- Type: Float +- Range: `[0, 2147483647]` +- Default value: `1` +- This variable is internally used in the Cost Model, and it is NOT recommended to modify its value unless directed by TiDB Optimizer Engineering. + +### tidb_opt_index_join_cost_factor New in v9.0.0 + +- Scope: SESSION | GLOBAL +- Applies to hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value): Yes +- Type: Float +- Range: `[0, 2147483647]` +- Default value: `1` +- This variable is internally used in the Cost Model, and it is NOT recommended to modify its value unless directed by TiDB Optimizer Engineering. + +### tidb_opt_index_lookup_cost_factor New in v9.0.0 + +- Scope: SESSION | GLOBAL +- Applies to hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value): Yes +- Type: Float +- Range: `[0, 2147483647]` +- Default value: `1` +- This variable is internally used in the Cost Model, and it is NOT recommended to modify its value unless directed by TiDB Optimizer Engineering. + +### tidb_opt_index_merge_cost_factor New in v9.0.0 + +- Scope: SESSION | GLOBAL +- Applies to hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value): Yes +- Type: Float +- Range: `[0, 2147483647]` +- Default value: `1` +- This variable is internally used in the Cost Model, and it is NOT recommended to modify its value unless directed by TiDB Optimizer Engineering. + +### tidb_opt_index_reader_cost_factor New in v9.0.0 + +- Scope: SESSION | GLOBAL +- Applies to hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value): Yes +- Type: Float +- Range: `[0, 2147483647]` +- Default value: `1` +- This variable is internally used in the Cost Model, and it is NOT recommended to modify its value unless directed by TiDB Optimizer Engineering. + +### tidb_opt_index_scan_cost_factor New in v9.0.0 + +- Scope: SESSION | GLOBAL +- Applies to hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value): Yes +- Type: Float +- Range: `[0, 2147483647]` +- Default value: `1` +- This variable is internally used in the Cost Model, and it is NOT recommended to modify its value unless directed by TiDB Optimizer Engineering. + +### tidb_opt_limit_cost_factor New in v9.0.0 + +- Scope: SESSION | GLOBAL +- Applies to hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value): Yes +- Type: Float +- Range: `[0, 2147483647]` +- Default value: `1` +- This variable is internally used in the Cost Model, and it is NOT recommended to modify its value unless directed by TiDB Optimizer Engineering. + +### tidb_opt_merge_join_cost_factor New in v9.0.0 + +- Scope: SESSION | GLOBAL +- Applies to hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value): Yes +- Type: Float +- Range: `[0, 2147483647]` +- Default value: `1` +- This variable is internally used in the Cost Model, and it is NOT recommended to modify its value unless directed by TiDB Optimizer Engineering. + +### tidb_opt_sort_cost_factor New in v9.0.0 + +- Scope: SESSION | GLOBAL +- Applies to hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value): Yes +- Type: Float +- Range: `[0, 2147483647]` +- Default value: `1` +- This variable is internally used in the Cost Model, and it is NOT recommended to modify its value unless directed by TiDB Optimizer Engineering. + +### tidb_opt_stream_agg_cost_factor New in v9.0.0 + +- Scope: SESSION | GLOBAL +- Applies to hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value): Yes +- Type: Float +- Range: `[0, 2147483647]` +- Default value: `1` +- This variable is internally used in the Cost Model, and it is NOT recommended to modify its value unless directed by TiDB Optimizer Engineering. + +### tidb_opt_table_fulL_scan_cost_factor New in v9.0.0 + +- Scope: SESSION | GLOBAL +- Applies to hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value): Yes +- Type: Float +- Range: `[0, 2147483647]` +- Default value: `1` +- This variable is internally used in the Cost Model, and it is NOT recommended to modify its value unless directed by TiDB Optimizer Engineering. + +### tidb_opt_table_range_scan_cost_factor New in v9.0.0 + +- Scope: SESSION | GLOBAL +- Applies to hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value): Yes +- Type: Float +- Range: `[0, 2147483647]` +- Default value: `1` +- This variable is internally used in the Cost Model, and it is NOT recommended to modify its value unless directed by TiDB Optimizer Engineering. + +### tidb_opt_table_reader_cost_factor New in v9.0.0 + +- Scope: SESSION | GLOBAL +- Applies to hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value): Yes +- Type: Float +- Range: `[0, 2147483647]` +- Default value: `1` +- This variable is internally used in the Cost Model, and it is NOT recommended to modify its value unless directed by TiDB Optimizer Engineering. + +### tidb_opt_table_rowid_cost_factor New in v9.0.0 + +- Scope: SESSION | GLOBAL +- Applies to hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value): Yes +- Type: Float +- Range: `[0, 2147483647]` +- Default value: `1` +- This variable is internally used in the Cost Model, and it is NOT recommended to modify its value unless directed by TiDB Optimizer Engineering. + +### tidb_opt_table_tiflash_scan_cost_factor New in v9.0.0 + +- Scope: SESSION | GLOBAL +- Applies to hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value): Yes +- Type: Float +- Range: `[0, 2147483647]` +- Default value: `1` +- This variable is internally used in the Cost Model, and it is NOT recommended to modify its value unless directed by TiDB Optimizer Engineering. + +### tidb_opt_topn_cost_factor New in v9.0.0 + +- Scope: SESSION | GLOBAL +- Applies to hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value): Yes +- Type: Float +- Range: `[0, 2147483647]` +- Default value: `1` +- This variable is internally used in the Cost Model, and it is NOT recommended to modify its value unless directed by TiDB Optimizer Engineering. + ### tidb_optimizer_selectivity_level - Scope: SESSION From 8c92cdf28b6d7ff0940b233b9d652fc9d0f1c252 Mon Sep 17 00:00:00 2001 From: tpp <146148086+terry1purcell@users.noreply.github.com> Date: Sun, 13 Apr 2025 15:50:43 -0700 Subject: [PATCH 2/5] Update system-variables.md Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@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 d1728baa03e63..d304bb92157fe 100644 --- a/system-variables.md +++ b/system-variables.md @@ -4989,7 +4989,7 @@ SHOW WARNINGS; - Default value: `1` - This variable is internally used in the Cost Model, and it is NOT recommended to modify its value unless directed by TiDB Optimizer Engineering. -### tidb_opt_table_fulL_scan_cost_factor New in v9.0.0 +### tidb_opt_table_full_scan_cost_factor New in v9.0.0 - Scope: SESSION | GLOBAL - Applies to hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value): Yes From 656a36689c1193729e1464d583d96d9c3cddff0f Mon Sep 17 00:00:00 2001 From: Aolin Date: Tue, 15 Jul 2025 15:32:52 +0800 Subject: [PATCH 3/5] system variables: add v8.5.3 where applicable and revise wording --- system-variables.md | 119 +++++++++++++++++++++++++++++++------------- 1 file changed, 85 insertions(+), 34 deletions(-) diff --git a/system-variables.md b/system-variables.md index d304bb92157fe..100fbe8fe5161 100644 --- a/system-variables.md +++ b/system-variables.md @@ -4890,158 +4890,209 @@ SHOW WARNINGS; - Default value: `OFF` - This variable is used to control whether to allow `INSERT`, `REPLACE`, and `UPDATE` statements to operate on the `_tidb_rowid` column. This variable can be used only when you import data using TiDB tools. -### tidb_opt_hash_agg_cost_factor New in v9.0.0 +### tidb_opt_hash_agg_cost_factor New in v8.5.3 and v9.0.0 + +> **Warning:** +> +> This variable is internally used in the [Cost Model](/cost-model.md), and it is **NOT** recommended to modify its value. - Scope: SESSION | GLOBAL - Applies to hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value): Yes - Type: Float - Range: `[0, 2147483647]` - Default value: `1` -- This variable is internally used in the Cost Model, and it is NOT recommended to modify its value unless directed by TiDB Optimizer Engineering. -### tidb_opt_hash_join_cost_factor New in v9.0.0 +### tidb_opt_hash_join_cost_factor New in v8.5.3 and v9.0.0 + +> **Warning:** +> +> This variable is internally used in the [Cost Model](/cost-model.md), and it is **NOT** recommended to modify its value. - Scope: SESSION | GLOBAL - Applies to hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value): Yes - Type: Float - Range: `[0, 2147483647]` - Default value: `1` -- This variable is internally used in the Cost Model, and it is NOT recommended to modify its value unless directed by TiDB Optimizer Engineering. -### tidb_opt_index_join_cost_factor New in v9.0.0 +### tidb_opt_index_join_cost_factor New in v8.5.3 and v9.0.0 + +> **Warning:** +> +> This variable is internally used in the [Cost Model](/cost-model.md), and it is **NOT** recommended to modify its value. - Scope: SESSION | GLOBAL - Applies to hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value): Yes - Type: Float - Range: `[0, 2147483647]` - Default value: `1` -- This variable is internally used in the Cost Model, and it is NOT recommended to modify its value unless directed by TiDB Optimizer Engineering. -### tidb_opt_index_lookup_cost_factor New in v9.0.0 +### tidb_opt_index_lookup_cost_factor New in v8.5.3 and v9.0.0 + +> **Warning:** +> +> This variable is internally used in the [Cost Model](/cost-model.md), and it is **NOT** recommended to modify its value. - Scope: SESSION | GLOBAL - Applies to hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value): Yes - Type: Float - Range: `[0, 2147483647]` - Default value: `1` -- This variable is internally used in the Cost Model, and it is NOT recommended to modify its value unless directed by TiDB Optimizer Engineering. -### tidb_opt_index_merge_cost_factor New in v9.0.0 +### tidb_opt_index_merge_cost_factor New in v8.5.3 and v9.0.0 + +> **Warning:** +> +> This variable is internally used in the [Cost Model](/cost-model.md), and it is **NOT** recommended to modify its value. - Scope: SESSION | GLOBAL - Applies to hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value): Yes - Type: Float - Range: `[0, 2147483647]` - Default value: `1` -- This variable is internally used in the Cost Model, and it is NOT recommended to modify its value unless directed by TiDB Optimizer Engineering. -### tidb_opt_index_reader_cost_factor New in v9.0.0 +### tidb_opt_index_reader_cost_factor New in v8.5.3 and v9.0.0 + +> **Warning:** +> +> This variable is internally used in the [Cost Model](/cost-model.md), and it is **NOT** recommended to modify its value. - Scope: SESSION | GLOBAL - Applies to hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value): Yes - Type: Float - Range: `[0, 2147483647]` - Default value: `1` -- This variable is internally used in the Cost Model, and it is NOT recommended to modify its value unless directed by TiDB Optimizer Engineering. -### tidb_opt_index_scan_cost_factor New in v9.0.0 +### tidb_opt_index_scan_cost_factor New in v8.5.3 and v9.0.0 + +> **Warning:** +> +> This variable is internally used in the [Cost Model](/cost-model.md), and it is **NOT** recommended to modify its value. - Scope: SESSION | GLOBAL - Applies to hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value): Yes - Type: Float - Range: `[0, 2147483647]` - Default value: `1` -- This variable is internally used in the Cost Model, and it is NOT recommended to modify its value unless directed by TiDB Optimizer Engineering. -### tidb_opt_limit_cost_factor New in v9.0.0 +### tidb_opt_limit_cost_factor New in v8.5.3 and v9.0.0 + +> **Warning:** +> +> This variable is internally used in the [Cost Model](/cost-model.md), and it is **NOT** recommended to modify its value. - Scope: SESSION | GLOBAL - Applies to hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value): Yes - Type: Float - Range: `[0, 2147483647]` - Default value: `1` -- This variable is internally used in the Cost Model, and it is NOT recommended to modify its value unless directed by TiDB Optimizer Engineering. -### tidb_opt_merge_join_cost_factor New in v9.0.0 +### tidb_opt_merge_join_cost_factor New in v8.5.3 and v9.0.0 + +> **Warning:** +> +> This variable is internally used in the [Cost Model](/cost-model.md), and it is **NOT** recommended to modify its value. - Scope: SESSION | GLOBAL - Applies to hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value): Yes - Type: Float - Range: `[0, 2147483647]` - Default value: `1` -- This variable is internally used in the Cost Model, and it is NOT recommended to modify its value unless directed by TiDB Optimizer Engineering. -### tidb_opt_sort_cost_factor New in v9.0.0 +### tidb_opt_sort_cost_factor New in v8.5.3 and v9.0.0 + +> **Warning:** +> +> This variable is internally used in the [Cost Model](/cost-model.md), and it is **NOT** recommended to modify its value. - Scope: SESSION | GLOBAL - Applies to hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value): Yes - Type: Float - Range: `[0, 2147483647]` - Default value: `1` -- This variable is internally used in the Cost Model, and it is NOT recommended to modify its value unless directed by TiDB Optimizer Engineering. -### tidb_opt_stream_agg_cost_factor New in v9.0.0 +### tidb_opt_stream_agg_cost_factor New in v8.5.3 and v9.0.0 + +> **Warning:** +> +> This variable is internally used in the [Cost Model](/cost-model.md), and it is **NOT** recommended to modify its value. - Scope: SESSION | GLOBAL - Applies to hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value): Yes - Type: Float - Range: `[0, 2147483647]` - Default value: `1` -- This variable is internally used in the Cost Model, and it is NOT recommended to modify its value unless directed by TiDB Optimizer Engineering. -### tidb_opt_table_full_scan_cost_factor New in v9.0.0 +### tidb_opt_table_full_scan_cost_factor New in v8.5.3 and v9.0.0 + +> **Warning:** +> +> This variable is internally used in the [Cost Model](/cost-model.md), and it is **NOT** recommended to modify its value. - Scope: SESSION | GLOBAL - Applies to hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value): Yes - Type: Float - Range: `[0, 2147483647]` - Default value: `1` -- This variable is internally used in the Cost Model, and it is NOT recommended to modify its value unless directed by TiDB Optimizer Engineering. -### tidb_opt_table_range_scan_cost_factor New in v9.0.0 +### tidb_opt_table_range_scan_cost_factor New in v8.5.3 and v9.0.0 + +> **Warning:** +> +> This variable is internally used in the [Cost Model](/cost-model.md), and it is **NOT** recommended to modify its value. - Scope: SESSION | GLOBAL - Applies to hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value): Yes - Type: Float - Range: `[0, 2147483647]` - Default value: `1` -- This variable is internally used in the Cost Model, and it is NOT recommended to modify its value unless directed by TiDB Optimizer Engineering. -### tidb_opt_table_reader_cost_factor New in v9.0.0 +### tidb_opt_table_reader_cost_factor New in v8.5.3 and v9.0.0 + +> **Warning:** +> +> This variable is internally used in the [Cost Model](/cost-model.md), and it is **NOT** recommended to modify its value. - Scope: SESSION | GLOBAL - Applies to hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value): Yes - Type: Float - Range: `[0, 2147483647]` - Default value: `1` -- This variable is internally used in the Cost Model, and it is NOT recommended to modify its value unless directed by TiDB Optimizer Engineering. -### tidb_opt_table_rowid_cost_factor New in v9.0.0 +### tidb_opt_table_rowid_cost_factor New in v8.5.3 and v9.0.0 + +> **Warning:** +> +> This variable is internally used in the [Cost Model](/cost-model.md), and it is **NOT** recommended to modify its value. - Scope: SESSION | GLOBAL - Applies to hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value): Yes - Type: Float - Range: `[0, 2147483647]` - Default value: `1` -- This variable is internally used in the Cost Model, and it is NOT recommended to modify its value unless directed by TiDB Optimizer Engineering. -### tidb_opt_table_tiflash_scan_cost_factor New in v9.0.0 +### tidb_opt_table_tiflash_scan_cost_factor New in v8.5.3 and v9.0.0 + +> **Warning:** +> +> This variable is internally used in the [Cost Model](/cost-model.md), and it is **NOT** recommended to modify its value. - Scope: SESSION | GLOBAL - Applies to hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value): Yes - Type: Float - Range: `[0, 2147483647]` - Default value: `1` -- This variable is internally used in the Cost Model, and it is NOT recommended to modify its value unless directed by TiDB Optimizer Engineering. -### tidb_opt_topn_cost_factor New in v9.0.0 +### tidb_opt_topn_cost_factor New in v8.5.3 and v9.0.0 + +> **Warning:** +> +> This variable is internally used in the [Cost Model](/cost-model.md), and it is **NOT** recommended to modify its value. - Scope: SESSION | GLOBAL - Applies to hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value): Yes - Type: Float - Range: `[0, 2147483647]` - Default value: `1` -- This variable is internally used in the Cost Model, and it is NOT recommended to modify its value unless directed by TiDB Optimizer Engineering. ### tidb_optimizer_selectivity_level From f9d59f77a1eda6ba3f89c48283092e47385479e9 Mon Sep 17 00:00:00 2001 From: Lilian Lee Date: Wed, 13 Aug 2025 16:28:02 +0800 Subject: [PATCH 4/5] Update wording and capitalization --- system-variables.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system-variables.md b/system-variables.md index 100fbe8fe5161..444cb35e88ab2 100644 --- a/system-variables.md +++ b/system-variables.md @@ -4894,7 +4894,7 @@ SHOW WARNINGS; > **Warning:** > -> This variable is internally used in the [Cost Model](/cost-model.md), and it is **NOT** recommended to modify its value. +> This variable is used internally by the [cost model](/cost-model.md), and it is **NOT** recommended to modify its value. - Scope: SESSION | GLOBAL - Applies to hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value): Yes From 3d5a26fffeacb8ec0a3322b589bee655f2a30347 Mon Sep 17 00:00:00 2001 From: lilin90 Date: Wed, 13 Aug 2025 16:31:42 +0800 Subject: [PATCH 5/5] Update wording --- system-variables.md | 50 ++++++++++++++++++++++----------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/system-variables.md b/system-variables.md index 444cb35e88ab2..2b560fe6142d6 100644 --- a/system-variables.md +++ b/system-variables.md @@ -4114,7 +4114,7 @@ As shown in this diagram, when [`tidb_enable_paging`](#tidb_enable_paging-new-in - Type: Float - Range: `[0, 18446744073709551615]` - 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 used internally by the [cost model](/cost-model.md), and it is **NOT** recommended to modify its value. ### tidb_opt_copcpu_factor @@ -4124,7 +4124,7 @@ As shown in this diagram, when [`tidb_enable_paging`](#tidb_enable_paging-new-in - Type: Float - Range: `[0, 18446744073709551615]` - 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 used internally by the [cost model](/cost-model.md), and it is **NOT** recommended to modify its value. ### tidb_opt_correlation_exp_factor @@ -4158,7 +4158,7 @@ As shown in this diagram, when [`tidb_enable_paging`](#tidb_enable_paging-new-in - 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 used internally by the [cost model](/cost-model.md), and it is **NOT** recommended to modify its value. ### `tidb_opt_derive_topn` New in v7.0.0 @@ -4177,7 +4177,7 @@ As shown in this diagram, when [`tidb_enable_paging`](#tidb_enable_paging-new-in - Type: Float - Range: `[0, 18446744073709551615]` - 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 used internally by the [cost model](/cost-model.md), and it is **NOT** recommended to modify its value. ### tidb_opt_disk_factor @@ -4187,7 +4187,7 @@ As shown in this diagram, when [`tidb_enable_paging`](#tidb_enable_paging-new-in - Type: Float - Range: `[0, 18446744073709551615]` - 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 used internally by the [cost model](/cost-model.md), and it is **NOT** recommended to modify its value. ### tidb_opt_distinct_agg_push_down @@ -4392,7 +4392,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 used internally by 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 @@ -4411,7 +4411,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 used internally by the [cost model](/cost-model.md), and it is **NOT** recommended to modify its value. ### tidb_opt_objective New in v7.4.0 @@ -4825,7 +4825,7 @@ SHOW WARNINGS; - 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 used internally by the [cost model](/cost-model.md), and it is **NOT** recommended to modify its value. ### tidb_opt_seek_factor @@ -4835,7 +4835,7 @@ SHOW WARNINGS; - 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 used internally by 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 @@ -4906,7 +4906,7 @@ SHOW WARNINGS; > **Warning:** > -> This variable is internally used in the [Cost Model](/cost-model.md), and it is **NOT** recommended to modify its value. +> This variable is used internally by the [cost model](/cost-model.md), and it is **NOT** recommended to modify its value. - Scope: SESSION | GLOBAL - Applies to hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value): Yes @@ -4918,7 +4918,7 @@ SHOW WARNINGS; > **Warning:** > -> This variable is internally used in the [Cost Model](/cost-model.md), and it is **NOT** recommended to modify its value. +> This variable is used internally by the [cost model](/cost-model.md), and it is **NOT** recommended to modify its value. - Scope: SESSION | GLOBAL - Applies to hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value): Yes @@ -4930,7 +4930,7 @@ SHOW WARNINGS; > **Warning:** > -> This variable is internally used in the [Cost Model](/cost-model.md), and it is **NOT** recommended to modify its value. +> This variable is used internally by the [cost model](/cost-model.md), and it is **NOT** recommended to modify its value. - Scope: SESSION | GLOBAL - Applies to hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value): Yes @@ -4942,7 +4942,7 @@ SHOW WARNINGS; > **Warning:** > -> This variable is internally used in the [Cost Model](/cost-model.md), and it is **NOT** recommended to modify its value. +> This variable is used internally by the [cost model](/cost-model.md), and it is **NOT** recommended to modify its value. - Scope: SESSION | GLOBAL - Applies to hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value): Yes @@ -4954,7 +4954,7 @@ SHOW WARNINGS; > **Warning:** > -> This variable is internally used in the [Cost Model](/cost-model.md), and it is **NOT** recommended to modify its value. +> This variable is used internally by the [cost model](/cost-model.md), and it is **NOT** recommended to modify its value. - Scope: SESSION | GLOBAL - Applies to hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value): Yes @@ -4966,7 +4966,7 @@ SHOW WARNINGS; > **Warning:** > -> This variable is internally used in the [Cost Model](/cost-model.md), and it is **NOT** recommended to modify its value. +> This variable is used internally by the [cost model](/cost-model.md), and it is **NOT** recommended to modify its value. - Scope: SESSION | GLOBAL - Applies to hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value): Yes @@ -4978,7 +4978,7 @@ SHOW WARNINGS; > **Warning:** > -> This variable is internally used in the [Cost Model](/cost-model.md), and it is **NOT** recommended to modify its value. +> This variable is used internally by the [cost model](/cost-model.md), and it is **NOT** recommended to modify its value. - Scope: SESSION | GLOBAL - Applies to hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value): Yes @@ -4990,7 +4990,7 @@ SHOW WARNINGS; > **Warning:** > -> This variable is internally used in the [Cost Model](/cost-model.md), and it is **NOT** recommended to modify its value. +> This variable is used internally by the [cost model](/cost-model.md), and it is **NOT** recommended to modify its value. - Scope: SESSION | GLOBAL - Applies to hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value): Yes @@ -5002,7 +5002,7 @@ SHOW WARNINGS; > **Warning:** > -> This variable is internally used in the [Cost Model](/cost-model.md), and it is **NOT** recommended to modify its value. +> This variable is used internally by the [cost model](/cost-model.md), and it is **NOT** recommended to modify its value. - Scope: SESSION | GLOBAL - Applies to hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value): Yes @@ -5014,7 +5014,7 @@ SHOW WARNINGS; > **Warning:** > -> This variable is internally used in the [Cost Model](/cost-model.md), and it is **NOT** recommended to modify its value. +> This variable is used internally by the [cost model](/cost-model.md), and it is **NOT** recommended to modify its value. - Scope: SESSION | GLOBAL - Applies to hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value): Yes @@ -5026,7 +5026,7 @@ SHOW WARNINGS; > **Warning:** > -> This variable is internally used in the [Cost Model](/cost-model.md), and it is **NOT** recommended to modify its value. +> This variable is used internally by the [cost model](/cost-model.md), and it is **NOT** recommended to modify its value. - Scope: SESSION | GLOBAL - Applies to hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value): Yes @@ -5038,7 +5038,7 @@ SHOW WARNINGS; > **Warning:** > -> This variable is internally used in the [Cost Model](/cost-model.md), and it is **NOT** recommended to modify its value. +> This variable is used internally by the [cost model](/cost-model.md), and it is **NOT** recommended to modify its value. - Scope: SESSION | GLOBAL - Applies to hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value): Yes @@ -5050,7 +5050,7 @@ SHOW WARNINGS; > **Warning:** > -> This variable is internally used in the [Cost Model](/cost-model.md), and it is **NOT** recommended to modify its value. +> This variable is used internally by the [cost model](/cost-model.md), and it is **NOT** recommended to modify its value. - Scope: SESSION | GLOBAL - Applies to hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value): Yes @@ -5062,7 +5062,7 @@ SHOW WARNINGS; > **Warning:** > -> This variable is internally used in the [Cost Model](/cost-model.md), and it is **NOT** recommended to modify its value. +> This variable is used internally by the [cost model](/cost-model.md), and it is **NOT** recommended to modify its value. - Scope: SESSION | GLOBAL - Applies to hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value): Yes @@ -5074,7 +5074,7 @@ SHOW WARNINGS; > **Warning:** > -> This variable is internally used in the [Cost Model](/cost-model.md), and it is **NOT** recommended to modify its value. +> This variable is used internally by the [cost model](/cost-model.md), and it is **NOT** recommended to modify its value. - Scope: SESSION | GLOBAL - Applies to hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value): Yes @@ -5086,7 +5086,7 @@ SHOW WARNINGS; > **Warning:** > -> This variable is internally used in the [Cost Model](/cost-model.md), and it is **NOT** recommended to modify its value. +> This variable is used internally by the [cost model](/cost-model.md), and it is **NOT** recommended to modify its value. - Scope: SESSION | GLOBAL - Applies to hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value): Yes