pt-query-digest:什么是“查询大小”?

时间:2017-04-03 07:16:15

标签: mysql percona mysqlbinlog pt-query-digest

我正在使用pt-query-digest来分析mysql binlog。不幸的是,我在pt-query-digest文档中找不到有关报告中“查询大小”行的任何描述。我猜,这个特性与查询输出大小有关,但它是一个UPDATE语句,而不是SELECT。

# Query 2: 235.21 QPS, 52.92x concurrency, ID 0x7ABED476DE0F9BF3 at byte 652451215
# This item is included in the report because it matches --limit.
# Scores: V/M = 29.85
# Time range: 2017-03-30 15:56:22 to 16:30:19
# Attribute    pct   total     min     max     avg     95%  stddev  median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count          9  479132
# Exec time     45 107792s       0     51s   225ms       0      3s       0
# Query size    28 127.99M     266     283  280.11  271.23    2.44  271.23
# error code     0       0       0       0       0       0       0       0
# String:
# Databases    dbname
# Query_time distribution
#   1us
#  10us
# 100us
#   1ms
#  10ms
# 100ms
#    1s  #################################
#  10s+  ################################################################
# Tables
#    SHOW TABLE STATUS FROM `dbname` LIKE 'tblname'\G
#    SHOW CREATE TABLE `dbname`.`tblname`\G
UPDATE `tblname`
                  SET `field1` = 100,
                      `time` = NOW()
                  WHERE `field2` = 1
                    AND `field3` = 2
                    AND `field4` = 3
                    AND `field5` = 0

它的目的是什么?

1 个答案:

答案 0 :(得分:0)

查询大小...是您查询的字节大小

在您的情况下,它是字符串的字节大小

"UPDATE `tblname`
                  SET `field1` = 100,
                      `time` = NOW()
                  WHERE `field2` = 1
                    AND `field3` = 2
                    AND `field4` = 3
                    AND `field5` = 0"