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 slow-query doc #849

Merged
merged 3 commits into from
Aug 23, 2018
Merged

*: add slow-query doc #849

merged 3 commits into from
Aug 23, 2018

Conversation

coocood
Copy link
Member

@coocood coocood commented Aug 20, 2018

No description provided.

@coocood
Copy link
Member Author

coocood commented Aug 20, 2018

@shenli @zz-jason PTAL

@lilin90 lilin90 changed the title add slow-query doc *: add slow-query doc Aug 21, 2018
Copy link
Member

@zz-jason zz-jason left a comment

Choose a reason for hiding this comment

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

LGTM


+ 慢查询日志的文件名。
+ 默认: ""
+ 设置后,慢查询日志单独会输出到该文件。
Copy link
Contributor

Choose a reason for hiding this comment

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

单独会 -> 会单独


# 慢查询日志

一个不合理的 SQL 语句会导致整个集群压力增大,响应变慢。对于这种问题,我们需要用慢查询日志来定位有问题的语句,解决性能问题。
Copy link
Contributor

Choose a reason for hiding this comment

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

一个 -> 一条


### 获取

通过在 TiDB 的日志文件上 grep SLOW_QUERY 这个关键字, 可以得到执行时间超过 [slow-threshold](../op-guide/tidb-config-file.md#slow-threshold) 的语句日志。
Copy link
Contributor

Choose a reason for hiding this comment

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

SLOW_QUERY -> SLOW_QUERY
关键字, -> 关键字,(Please change the English comma to the Chinese comma.)


一个不合理的 SQL 语句会导致整个集群压力增大,响应变慢。对于这种问题,我们需要用慢查询日志来定位有问题的语句,解决性能问题。

### 获取
Copy link
Contributor

Choose a reason for hiding this comment

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

Add more details in this heading:
获取 -> 获取日志


#### backoff_time

表示语句遇到需要重试的错误,在重试前等待的时间,有很多种可能,常见的原因有遇到了 lock,region 分裂,
Copy link
Contributor

@yikeke yikeke Aug 22, 2018

Choose a reason for hiding this comment

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

  1. region -> Region
  2. In a Chinese text, use a Chinese back-sloping comma (顿号) to separate items in a list:
    lock,region 分裂, -> lock、Region 分裂、
  3. Rewrite advice: 表示语句遇到需要重试的错误时在重试前等待的时间,遇到错误有几种常见的原因:lock、Region 分裂和 tikv server is busy 等。


#### cost_time

表示执行这个语句花费的时间。只有执行时间超过 slow-threshold
Copy link
Contributor

Choose a reason for hiding this comment

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

There are some redundant line breaks (换行符) in this document, please remove them.


#### succ

请求是否执行成功
Copy link
Contributor

Choose a reason for hiding this comment

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

Keep consistent with the above descriptions below headings:
请求是否执行成功 -> 表示请求是否执行成功。


#### con

connection ID,即 session ID, 可以用类似 `con:3 ` 的关键字在日志中 grep 出 session ID 为 3 的日志。
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add "表示" at the beginning of every description sentences below and add the period (句号) if needed.

Copy link
Contributor

@yikeke yikeke left a comment

Choose a reason for hiding this comment

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

@coocood
Copy link
Member Author

coocood commented Aug 22, 2018

@yikeke
PTAL

Copy link
Contributor

@yikeke yikeke left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@shenli shenli left a comment

Choose a reason for hiding this comment

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

LGTM

@shenli shenli merged commit c890fce into pingcap:master Aug 23, 2018
yikeke pushed a commit to yikeke/docs that referenced this pull request Aug 27, 2018
IzabelWang added a commit to IzabelWang/docs-cn that referenced this pull request Mar 28, 2019
@coocood coocood deleted the slow-query branch September 6, 2019 04:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants