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 the default value of tidb_stmt_summary_max_stmt_count #6718

Merged
merged 3 commits into from
Jul 23, 2021
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
2 changes: 1 addition & 1 deletion sql-statements/sql-statement-show-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ SHOW GLOBAL VARIABLES LIKE 'tidb%';
| tidb_stmt_summary_history_size | 24 |
| tidb_stmt_summary_internal_query | 0 |
| tidb_stmt_summary_max_sql_length | 4096 |
| tidb_stmt_summary_max_stmt_count | 200 |
| tidb_stmt_summary_max_stmt_count | 3000 |
| tidb_stmt_summary_refresh_interval | 1800 |
| tidb_store_limit | 0 |
| tidb_txn_mode | |
Expand Down
2 changes: 1 addition & 1 deletion statement-summary-tables.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ select * from employee where id in (...) and salary between ? and ?;
- `tidb_enable_stmt_summary`:是否打开 statement summary 功能。1 代表打开,0 代表关闭,默认打开。statement summary 关闭后,系统表里的数据会被清空,下次打开后重新统计。经测试,打开后对性能几乎没有影响。
- `tidb_stmt_summary_refresh_interval`:`statements_summary` 的清空周期,单位是秒 (s),默认值是 `1800`。
- `tidb_stmt_summary_history_size`:`statements_summary_history` 保存每种 SQL 的历史的数量,默认值是 `24`。
- `tidb_stmt_summary_max_stmt_count`:statement summary tables 保存的 SQL 种类数量,默认 200 条。当 SQL 种类超过该值时,会移除最近没有使用的 SQL。
- `tidb_stmt_summary_max_stmt_count`:statement summary tables 保存的 SQL 种类数量。v4.0.14 前,默认 200 条。自 v4.0.14,默认 3000 条。当 SQL 种类超过该值时,会移除最近没有使用的 SQL。
- `tidb_stmt_summary_max_sql_length`:字段 `DIGEST_TEXT` 和 `QUERY_SAMPLE_TEXT` 的最大显示长度,默认值是 4096。
- `tidb_stmt_summary_internal_query`:是否统计 TiDB 的内部 SQL。1 代表统计,0 代表不统计,默认不统计。

Expand Down
2 changes: 1 addition & 1 deletion system-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -870,7 +870,7 @@ set tidb_slow_log_threshold = 200;

- 作用域:SESSION | GLOBAL

- 默认值:200(受配置文件影响,这里给出的是默认配置文件取值)
- 默认值:v4.0.14 前为 200。自 v4.0.14 起为 3000(受配置文件影响,这里给出的是默认配置文件取值)

- 这个变量设置了 statement summary 在内存中保存的语句的最大数量。

Expand Down