diff --git a/statistics.md b/statistics.md index 653896c456b9f..65c4fdb1dff15 100644 --- a/statistics.md +++ b/statistics.md @@ -5,7 +5,7 @@ summary: Learn how the statistics collect table-level and column-level informati # 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 a0e41f63ca6b4..f67a989b3269d 100644 --- a/system-variables.md +++ b/system-variables.md @@ -217,6 +217,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