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

Refine slow log description (#18127) #18133

Merged
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 system-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -3140,7 +3140,7 @@ Query OK, 0 rows affected, 1 warning (0.00 sec)
- 默认值:`300`
- 范围:`[-1, 9223372036854775807]`
- 单位:毫秒
- 输出慢日志的耗时阈值。当查询大于这个值,就会当做是一个慢查询,输出到慢查询日志。默认为 300 ms。
- 输出慢日志的耗时阈值默认为 300 ms。如果查询耗时大于这个值,会视作一个慢查询,并记录到慢查询日志。注意,当日志的输出级别 [`log.level`](/tidb-configuration-file.md#level) 是 `"debug"` 时,所有查询都会记录到慢日志,不受该变量的限制

### `tidb_slow_query_file`

Expand Down
4 changes: 2 additions & 2 deletions tidb-configuration-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ TiDB 配置文件比命令行参数支持更多的选项。你可以在 [config/
+ 输出慢日志的耗时阈值。
+ 默认值:300
+ 单位:毫秒
+ 当查询大于这个值,就会当做是一个慢查询,输出到慢查询日志
+ 如果查询耗时大于这个值,会视作一个慢查询,并记录到慢查询日志。注意,当日志的输出级别 [`log.level`](#level) 是 `"debug"` 时,所有查询都会记录到慢日志,不受该参数的限制
+ 自 v6.1.0 起,已改用配置项 `instance.tidb_slow_log_threshold` 或系统变量 `tidb_slow_log_threshold` 来设置输出慢日志的耗时阈值。`slow-threshold` 仍可使用,但如果同时设置了 `slow-threshold` 与 `instance.tidb_slow_log_threshold`,TiDB 将采用 `instance.tidb_slow_log_threshold` 的值。

### `record-plan-in-slow-log`
Expand Down Expand Up @@ -807,7 +807,7 @@ TiDB 服务状态相关配置。
+ 默认值:300
+ 范围:`[-1, 9223372036854775807]`
+ 单位:毫秒
+ 当查询大于这个值,就会当做是一个慢查询,输出到慢查询日志
+ 如果查询耗时大于这个值,会视作一个慢查询,并记录到慢查询日志。注意,当日志的输出级别 [`log.level`](#level) 是 `"debug"` 时,所有查询都会记录到慢日志,不受该参数的限制
+ 在 v6.1.0 之前,该功能通过配置项 `slow-threshold` 进行设置。

### `tidb_expensive_query_time_threshold`
Expand Down
Loading