Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
TomShawn authored Jul 30, 2021
1 parent f206675 commit cae4dc0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
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 种类数量。v4.0.14 前,默认 200 条。自 v4.0.14,默认 3000 条。当 SQL 种类超过该值时,会移除最近没有使用的 SQL。
- `tidb_stmt_summary_max_stmt_count`:statement summary tables 保存的 SQL 种类数量。v5.1.1 前,默认 200 条。自 v5.1.1 起,默认 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
8 changes: 1 addition & 7 deletions system-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -1268,14 +1268,8 @@ set tidb_slow_log_threshold = 200;
### `tidb_stmt_summary_max_stmt_count` <span class="version-mark">从 v4.0 版本开始引入</span>

- 作用域:SESSION | GLOBAL
<<<<<<< HEAD
- 默认值:`200`
- 默认值:v5.1.1 前为 `200`。自 v5.1.1 起为 `3000`
- 范围:`[1, 32767]`
=======

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

>>>>>>> c9dd5a125 (Update the default value of tidb_stmt_summary_max_stmt_count (#6718))
- 这个变量设置了 statement summary 在内存中保存的语句的最大数量。

### `tidb_stmt_summary_refresh_interval` <span class="version-mark">从 v4.0 版本开始引入</span>
Expand Down

0 comments on commit cae4dc0

Please sign in to comment.