diff --git a/sql-statements/sql-statement-lock-stats.md b/sql-statements/sql-statement-lock-stats.md index 25057e7ba9476..a924a0b2c1a36 100644 --- a/sql-statements/sql-statement-lock-stats.md +++ b/sql-statements/sql-statement-lock-stats.md @@ -7,6 +7,10 @@ summary: An overview of the usage of LOCK STATS for the TiDB database. `LOCK STATS` is used to lock the statistics of tables or partitions. When the statistics is locked, TiDB does not automatically update the statistics of the table or partition. For details on the behavior, see [Behaviors of locking statistics](/statistics.md#behaviors-of-locking-statistics). +> **Warning:** +> +> Locking statistics is an experimental feature for the current version. It is not recommended to use it in the production environment. + ## Synopsis ```ebnf+diagram diff --git a/sql-statements/sql-statement-show-stats-locked.md b/sql-statements/sql-statement-show-stats-locked.md index a3f9d66e41273..51e026bdcc8da 100644 --- a/sql-statements/sql-statement-show-stats-locked.md +++ b/sql-statements/sql-statement-show-stats-locked.md @@ -7,6 +7,10 @@ summary: An overview of the usage of SHOW STATS_LOCKED for the TiDB database. `SHOW STATS_LOCKED` shows the tables whose statistics are locked. +> **Warning:** +> +> Locking statistics is an experimental feature for the current version. It is not recommended to use it in the production environment. + ## Synopsis ```ebnf+diagram diff --git a/sql-statements/sql-statement-unlock-stats.md b/sql-statements/sql-statement-unlock-stats.md index cd6446a8bafaf..059229a2889be 100644 --- a/sql-statements/sql-statement-unlock-stats.md +++ b/sql-statements/sql-statement-unlock-stats.md @@ -7,6 +7,10 @@ summary: An overview of the usage of UNLOCK STATS for the TiDB database. `UNLOCK STATS` is used to unlock the statistics of a table or tables. +> **Warning:** +> +> Locking statistics is an experimental feature for the current version. It is not recommended to use it in the production environment. + ## Synopsis ```ebnf+diagram diff --git a/statistics.md b/statistics.md index 4a2ec19759dd4..26e0b20c0d8bc 100644 --- a/statistics.md +++ b/statistics.md @@ -819,6 +819,10 @@ LOAD STATS 'file_name' ## Lock statistics +> **Warning:** +> +> Locking statistics is an experimental feature for the current version. It is not recommended to use it in the production environment. + Starting from v6.5.0, TiDB supports locking statistics. After the statistics of a table or a partition are locked, the statistics of the table cannot be modified and the `ANALYZE` statement cannot be executed on the table. For example: Create table `t`, and insert data into it. When the statistics of table `t` are not locked, the `ANALYZE` statement can be successfully executed.