Skip to content

Commit

Permalink
Update the default value of tidb_stmt_summary_max_stmt_count (#6718) (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
ti-chi-bot authored Oct 9, 2021
1 parent 7b46854 commit 2ec7e72
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
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 @@ -134,7 +134,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 @@ -98,7 +98,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 种类数量。v5.0.4 前,默认 200 条。自 v5.0.4 起,默认 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 @@ -1242,7 +1242,7 @@ set tidb_slow_log_threshold = 200;
### `tidb_stmt_summary_max_stmt_count` <span class="version-mark">从 v4.0 版本开始引入</span>

- 作用域:SESSION | GLOBAL
- 默认值:`200`
- 默认值:v5.0.4 前为 200。自 v5.0.4 起为 3000
- 范围:`[1, 32767]`
- 这个变量设置了 [statement summary tables](/statement-summary-tables.md) 在内存中保存的语句的最大数量。

Expand Down

0 comments on commit 2ec7e72

Please sign in to comment.