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

*: add tidb_enable_stats_owner #18817

Merged
merged 6 commits into from
Oct 31, 2024
Merged
Show file tree
Hide file tree
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
9 changes: 9 additions & 0 deletions system-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -2329,6 +2329,15 @@ mysql> SELECT job_info FROM mysql.analyze_jobs ORDER BY end_time DESC LIMIT 1;
- 默认值:`ON`
- 这个变量用于控制是否开启 slow log 功能。

### `tidb_enable_stats_owner` <span class="version-mark">从 v8.4.0 版本开始引入</span>

- 作用域:GLOBAL
- 是否持久化到集群:否,仅作用于当前连接的 TiDB 实例
- 是否受 Hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value) 控制:否
- 默认值:`ON`
- 可选值:`OFF`、`ON`
- 用于设置该 TiDB 实例是否可以运行[统计信息自动更新](/statistics.md#自动更新)任务。若当前 TiDB 集群中只有一台 TiDB 实例,则不能禁止该实例运行统计信息自动更新,即不能设置为 `OFF`。
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

若当前 TiDB 集群中只有一台 TiDB 实例,将该变量设置为 OFF,TiDB 会报错吗


### `tidb_enable_stmt_summary` <span class="version-mark">从 v3.0.4 版本开始引入</span>

- 作用域:GLOBAL
Expand Down
7 changes: 7 additions & 0 deletions tidb-configuration-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -947,6 +947,13 @@ TiDB 服务状态相关配置。
+ 该值作为系统变量 [`tidb_enable_ddl`](/system-variables.md#tidb_enable_ddl-从-v630-版本开始引入) 的初始值。
+ 在 v6.3.0 之前,该功能由配置项 `run-ddl` 进行设置。

### `tidb_enable_stats_owner` <span class="version-mark">从 v8.4.0 版本开始引入</span>

+ 用于表示该 tidb-server 是否可以运行[统计信息自动更新](/statistics.md#自动更新)任务。
+ 默认值:`true`
+ 可选值:`true`、`false`
+ 该值作为系统变量 [`tidb_enable_stats_owner`](/system-variables.md#tidb_enable_stats_owner-从-v840-版本开始引入) 的初始值。

### `tidb_stmt_summary_enable_persistent` <span class="version-mark">从 v6.6.0 版本开始引入</span>

> **警告:**
Expand Down
Loading