diff --git a/statistics.md b/statistics.md index d2516fbf38719..aba956eacf9e2 100644 --- a/statistics.md +++ b/statistics.md @@ -6,7 +6,7 @@ aliases: ['/docs/dev/statistics/','/docs/dev/reference/performance/statistics/'] # Introduction to Statistics -TiDB uses statistics to decide [which index to choose](/choose-index.md). The `tidb_analyze_version` variable controls the statistics collected by TiDB. Currently, two versions of statistics are supported: `tidb_analyze_version = 1` and `tidb_analyze_version = 2`. In versions before v5.1, the default value of this variable is `1`. In v5.1, the default value of this variable is `2`, which serves as an experimental feature. These two versions include different information in TiDB: +TiDB uses statistics to decide [which index to choose](/choose-index.md). The `tidb_analyze_version` variable controls the statistics collected by TiDB. Currently, two versions of statistics are supported: `tidb_analyze_version = 1` and `tidb_analyze_version = 2`. In versions before v5.1.0, the default value of this variable is `1`. In v5.1.0, the default value of this variable is `2`, which serves as an experimental feature. These two versions include different information in TiDB: | Information | Version 1 | Version 2| | --- | --- | ---| diff --git a/system-variables.md b/system-variables.md index eabede51b3cbf..36226e03e6af3 100644 --- a/system-variables.md +++ b/system-variables.md @@ -218,6 +218,14 @@ MPP is a distributed computing framework provided by the TiFlash engine, which a - Default value: `OFF` - This variable is used to set whether the `AUTO_INCREMENT` property of a column is allowed to be removed by executing `ALTER TABLE MODIFY` or `ALTER TABLE CHANGE` statements. It is not allowed by default. +### tidb_analyze_version New in v5.1.0 + +- Scope: SESSION | GLOBAL +- Value options: `1` and `2` +- Default value: `2` +- Controls how TiDB collects statistics. +- In versions before v5.1.0, the default value of this variable is `1`. In v5.1.0, the default value of this variable is `2`, which serves as an experimental feature. For detailed introduction, see [Introduction to Statistics](/statistics.md). + ### tidb_auto_analyze_end_time - Scope: GLOBAL