简体   繁体   English

mysqldumpslow:这些字段表示什么..?

[英]mysqldumpslow: What does these fields indicate..?

Recently we have started on optimizing live slow queries.最近我们开始优化实时慢查询。 As part of that, we thought to use mysqldumpslow to prioritize slow queries.作为其中的一部分,我们考虑使用 mysqldumpslow 来确定慢速查询的优先级。 I am new to this tool.我是这个工具的新手。 I am able to understand some basic info, but I would like to know what exactly the below fields in the out put will tell us.我能够理解一些基本信息,但我想知道输出中的以下字段究竟会告诉我们什么。

OUTPUT: Count: 6 Time=22.64s (135s) Lock=0.00s (0s) Rows=1.0 (6) OUTPUT:计数:6 时间=22.64s (135s) 锁定=0.00s (0s) 行数=1.0 (6)

What about the below fields?下面的字段呢?

Time : Is it the average time taken of all these 6 times of occurance...?
135s : What is this 135 seconds....?
Rows=1.0 (6): again what does this mean...?

I didn't find a better explanation.我没有找到更好的解释。 Really thanks in advance.真的很感谢。 Regards, UDAY问候,乌代

I made a research for that coz i wanted to know that too.我为此进行了研究,因为我也想知道。
I have a log from a pretty highly used DB server.我有一个来自使用率很高的数据库服务器的日志。
The command mysqldumpslow has several optional parameters ( https://dev.mysql.com/doc/refman/5.7/en/mysqldumpslow.html ), including sort by (-s) thanks to many queries I can work with, I can tell, that:命令 mysqldumpslow 有几个可选参数( https://dev.mysql.com/doc/refman/5.7/en/mysqldumpslow.html ),包括排序依据(-s)感谢我可以使用的许多查询,我可以告诉, 那:
value before brackets represents an average value from all the same queries within to group ('count' in total) and the value within brackets is the maximum value of one of the queries.括号前的值表示组内所有相同查询的平均值(总共“计数”),括号内的值是其中一个查询的最大值。 Meaning, in your case:意思是,在你的情况下:
you have a query that was called 6 times, it is executed within 22.64 seconds (average), but once it took about 135 seconds to execute it.您有一个被调用 6 次的查询,它在 22.64 秒(平均)内执行,但是一旦执行它大约需要 135 秒。 The same applies for locks (if provided) and rows.这同样适用于锁(如果提供)和行。 So most of the time it returns about one row, however it returned 6 rows at least once所以大多数时候它返回大约一行,但它至少返回 6 行一次

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM