Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update default value of tidb_analyze_version in v5.1 and v5.2 (#8411) #8551

Merged
Merged
Show file tree
Hide file tree
Changes from 6 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
7 changes: 6 additions & 1 deletion statistics.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@ title: 统计信息简介

# 统计信息简介

TiDB 使用统计信息来决定[索引的选择](/choose-index.md)。变量 `tidb_analyze_version` 用于控制所收集到的统计信息。目前 TiDB 中支持两种统计信息:`tidb_analyze_version = 1` 以及 `tidb_analyze_version = 2`。在 v5.1.0 以前的版本中,该变量的默认值为 `1`。在 v5.1、v5.2、v5.3 中,该变量的默认值为 `2`,作为实验特性启用。
TiDB 使用统计信息来决定[索引的选择](/choose-index.md)。变量 `tidb_analyze_version` 用于控制所收集到的统计信息。目前 TiDB 中支持两种统计信息:`tidb_analyze_version = 1` 以及 `tidb_analyze_version = 2`。`tidb_analyze_version` 在 TiDB v5.1.x 各版本的默认值说明如下:
TomShawn marked this conversation as resolved.
Show resolved Hide resolved

| 版本 | 默认值 |
| :- | :- |
| v5.1.0 - v5.1.3 | `2`,作为实验特性使用 |
| v5.1.4 及之后的 v5.1.x 版本 | `1` |
TomShawn marked this conversation as resolved.
Show resolved Hide resolved

> **注意:**
>
Expand Down
7 changes: 6 additions & 1 deletion system-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,12 @@ MPP 是 TiFlash 引擎提供的分布式计算框架,允许节点之间的数
- 默认值:`2`
TomShawn marked this conversation as resolved.
Show resolved Hide resolved
- 范围:`[1, 2]`
- 这个变量用于控制 TiDB 收集统计信息的行为。
- 在 v5.1.0 以前的版本中,该变量的默认值为 `1`。在 v5.1.0 中,该变量的默认值为 `2`,作为实验特性使用,具体可参照[统计信息简介](/statistics.md)文档。
- `tidb_analyze_version` 在 TiDB v5.1.x 各版本的默认值说明如下,具体可参照[统计信息简介](/statistics.md)文档。
TomShawn marked this conversation as resolved.
Show resolved Hide resolved

| 版本 | 默认值 |
| :- | :- |
| v5.1.0 - v5.1.3 | `2`,作为实验特性使用 |
| v5.1.4 及之后的 v5.1.x 版本 | `1` |
TomShawn marked this conversation as resolved.
Show resolved Hide resolved

### `tidb_auto_analyze_end_time`

Expand Down