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 time unit for slow query log document #3999

Open
shenli opened this issue Oct 2, 2020 · 4 comments
Open

Add time unit for slow query log document #3999

shenli opened this issue Oct 2, 2020 · 4 comments
Assignees
Labels
lifecycle/frozen Issues with this label will not be labeled as "stale".

Comments

@shenli
Copy link
Member

shenli commented Oct 2, 2020

Change Request

This repository is ONLY used to solve issues related to DOCS.
For other issues (related to TiDB, PD, etc), please move to other repositories.

Please answer the following questions before submitting your issue. Thanks!

  1. Describe what you find is inappropriate or missing in the existing docs.
    https://docs.pingcap.com/tidb/stable/identify-slow-queries#identify-slow-queries
    In the slow query log, there are several fields about execution time, like:
# Cop_proc_avg: 0.07 Cop_proc_p90: 0.07 Cop_proc_max: 0.07 Cop_proc_addr: 172.16.5.87:20171
# Cop_wait_avg: 0 Cop_wait_p90: 0 Cop_wait_max: 0 Cop_wait_addr: 172.16.5.87:20171
# Cop_backoff_regionMiss_total_times: 200 Cop_backoff_regionMiss_total_time: 0.2 Cop_backoff_regionMiss_max_time: 0.2 Cop_backoff_regionMiss_max_addr: 127.0.0.1 Cop_backoff_regionMiss_avg_time: 0.2 Cop_backoff_regionMiss_p90_time: 0.2
# Cop_backoff_rpcPD_total_times: 200 Cop_backoff_rpcPD_total_time: 0.2 Cop_backoff_rpcPD_max_time: 0.2 Cop_backoff_rpcPD_max_addr: 127.0.0.1 Cop_backoff_rpcPD_avg_time: 0.2 Cop_backoff_rpcPD_p90_time: 0.2
# Cop_backoff_rpcTiKV_total_times: 200 Cop_backoff_rpcTiKV_total_time: 0.2 Cop_backoff_rpcTiKV_max_time: 0.2 Cop_backoff_rpcTiKV_max_addr: 127.0.0.1 Cop_backoff_rpcTiKV_avg_time: 0.2 Cop_backoff_rpcTiKV_p90_time: 0.2

But the descriptions don't show the unit. I can not tell the execution time is second or millisecond.

Cop_proc_avg: The average execution time of cop-tasks.
Cop_proc_p90: The P90 execution time of cop-tasks.
Cop_proc_max: The maximum execution time of cop-tasks.
  1. Describe your suggestion or addition.
    Add the time unit for the execution time fields.

  2. Provide some reference materials (documents, websites, etc) if you could.

@TomShawn
Copy link
Contributor

TomShawn commented Oct 9, 2020

@crazycs520 Could you take a look? Thanks!

@crazycs520
Copy link
Contributor

@shenli

Note:
The unit of all the following time fields in the slow query log is "second".

the doc is from https://docs.pingcap.com/tidb/stable/identify-slow-queries#fields-description.

Adding unit for serveral fields of execution time will break compatibility with MySQL slow-log format, also infect the usage of pt-query-digest

@TomShawn
Copy link
Contributor

TomShawn commented Nov 12, 2020

@shenli What do you think of the answer above?

@github-actions
Copy link

This issue is stale because it has been open for 60 days with no activity. If no comment has been made and the lifecycle/stale label is not removed, this issue will be closed in 15 days.

@github-actions github-actions bot added the lifecycle/stale This issue has been open for 60 days with no activity. label Jan 12, 2021
@TomShawn TomShawn added lifecycle/frozen Issues with this label will not be labeled as "stale". and removed lifecycle/stale This issue has been open for 60 days with no activity. labels Jan 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lifecycle/frozen Issues with this label will not be labeled as "stale".
Projects
None yet
Development

No branches or pull requests

3 participants