Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
119 changes: 85 additions & 34 deletions system-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -4698,158 +4698,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 <span class="version-mark">New in v9.0.0</span>
### tidb_opt_hash_agg_cost_factor <span class="version-mark">New in v8.5.3 and v9.0.0</span>

> **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 <span class="version-mark">New in v9.0.0</span>
### tidb_opt_hash_join_cost_factor <span class="version-mark">New in v8.5.3 and v9.0.0</span>

> **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 <span class="version-mark">New in v9.0.0</span>
### tidb_opt_index_join_cost_factor <span class="version-mark">New in v8.5.3 and v9.0.0</span>

> **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 <span class="version-mark">New in v9.0.0</span>
### tidb_opt_index_lookup_cost_factor <span class="version-mark">New in v8.5.3 and v9.0.0</span>

> **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 <span class="version-mark">New in v9.0.0</span>
### tidb_opt_index_merge_cost_factor <span class="version-mark">New in v8.5.3 and v9.0.0</span>

> **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 <span class="version-mark">New in v9.0.0</span>
### tidb_opt_index_reader_cost_factor <span class="version-mark">New in v8.5.3 and v9.0.0</span>

> **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 <span class="version-mark">New in v9.0.0</span>
### tidb_opt_index_scan_cost_factor <span class="version-mark">New in v8.5.3 and v9.0.0</span>

> **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 <span class="version-mark">New in v9.0.0</span>
### tidb_opt_limit_cost_factor <span class="version-mark">New in v8.5.3 and v9.0.0</span>

> **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 <span class="version-mark">New in v9.0.0</span>
### tidb_opt_merge_join_cost_factor <span class="version-mark">New in v8.5.3 and v9.0.0</span>

> **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 <span class="version-mark">New in v9.0.0</span>
### tidb_opt_sort_cost_factor <span class="version-mark">New in v8.5.3 and v9.0.0</span>

> **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 <span class="version-mark">New in v9.0.0</span>
### tidb_opt_stream_agg_cost_factor <span class="version-mark">New in v8.5.3 and v9.0.0</span>

> **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 <span class="version-mark">New in v9.0.0</span>
### tidb_opt_table_full_scan_cost_factor <span class="version-mark">New in v8.5.3 and v9.0.0</span>

> **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 <span class="version-mark">New in v9.0.0</span>
### tidb_opt_table_range_scan_cost_factor <span class="version-mark">New in v8.5.3 and v9.0.0</span>

> **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 <span class="version-mark">New in v9.0.0</span>
### tidb_opt_table_reader_cost_factor <span class="version-mark">New in v8.5.3 and v9.0.0</span>

> **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 <span class="version-mark">New in v9.0.0</span>
### tidb_opt_table_rowid_cost_factor <span class="version-mark">New in v8.5.3 and v9.0.0</span>

> **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 <span class="version-mark">New in v9.0.0</span>
### tidb_opt_table_tiflash_scan_cost_factor <span class="version-mark">New in v8.5.3 and v9.0.0</span>

> **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 <span class="version-mark">New in v9.0.0</span>
### tidb_opt_topn_cost_factor <span class="version-mark">New in v8.5.3 and v9.0.0</span>

> **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

Expand Down