pt-query-digest 解析binlog

mysql版本:5.7.19

mysqlbinlog  mysql-bin.000154 > mysql-bin.000154.txt
/home/mysql/mysql_tools/pt-query-digest --type binlog mysql-bin.000154.txt > zzg.sql
mysql-bin.000154.txt:   6% 06:48 remain
mysql-bin.000154.txt:  13% 06:09 remain
mysql-bin.000154.txt:  21% 05:34 remain
mysql-bin.000154.txt:  28% 05:01 remain
mysql-bin.000154.txt:  35% 04:29 remain
mysql-bin.000154.txt:  42% 03:58 remain
mysql-bin.000154.txt:  50% 03:28 remain
mysql-bin.000154.txt:  57% 02:58 remain
mysql-bin.000154.txt:  64% 02:28 remain
mysql-bin.000154.txt:  71% 01:58 remain
mysql-bin.000154.txt:  79% 01:27 remain
mysql-bin.000154.txt:  86% 00:55 remain
mysql-bin.000154.txt:  94% 00:24 remain

cat zzg.sql 感觉结果好像有问题。。。。。。
# 410.8s user time, 2.8s system time, 23.10M rss, 180.35M vsz
# Current date: Mon May 25 15:32:07 2020
# Hostname: edsspstdb30
# Files: mysql-bin.000154.txt
# Overall: 1.25M total, 5 unique, 116.43 QPS, 0.02x concurrency __________
# Time range: 2020-05-19 17:00:54 to 20:00:03
# Attribute          total     min     max     avg     95%  stddev  median
# ============     ======= ======= ======= ======= ======= ======= =======
# Exec time           165s       0      1s   131us       0    11ms       0
# Query size        13.13M       5     173    5.50    5.75    0.41    5.75
# @@session.au           1       1       1       1       1       0       1
# @@session.au           1       1       1       1       1       0       1
# @@session.au           1       1       1       1       1       0       1
# @@session.ch          33      33      33      33      33       0      33
# @@session.co          33      33      33      33      33       0      33
# @@session.co          33      33      33      33      33       0      33
# @@session.fo           1       1       1       1       1       0       1
# @@session.lc           0       0       0       0       0       0       0
# @@session.ps       3.07M   3.07M   3.07M   3.07M   3.07M       0   3.07M
# @@session.sq           0       0       0       0       0       0       0
# @@session.sq       1.31G   1.31G   1.31G   1.31G   1.31G       0   1.31G
# @@session.un           1       1       1       1       1       0       1
# error code             0       0       0       0       0       0       0

# Profile
# Rank Query ID           Response time   Calls   R/Call V/M   Item
# ==== ================== =============== ======= ====== ===== =====
#    1 0x85FFF5AA78E5FF6A 165.0000 100.0% 1251523 0.0001  0.98 BEGIN

# Query 1: 116.43 QPS, 0.02x concurrency, ID 0x85FFF5AA78E5FF6A at byte 1517149472
# This item is included in the report because it matches --limit.
# Scores: V/M = 0.98
# Time range: 2020-05-19 17:00:54 to 20:00:03
# Attribute    pct   total     min     max     avg     95%  stddev  median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count        100 1251523
# Exec time    100    165s       0      1s   131us       0    11ms       0
# Query size    45   5.97M       5       5       5       5       0       5
# @@session.au 100       1       1       1       1       1       0       1
# @@session.au 100       1       1       1       1       1       0       1
# @@session.au 100       1       1       1       1       1       0       1
# @@session.ch 100      33      33      33      33      33       0      33
# @@session.co 100      33      33      33      33      33       0      33
# @@session.co 100      33      33      33      33      33       0      33
# @@session.fo 100       1       1       1       1       1       0       1
# @@session.lc   0       0       0       0       0       0       0       0
# @@session.ps 100   3.07M   3.07M   3.07M   3.07M   3.07M       0   3.07M
# @@session.sq   0       0       0       0       0       0       0       0
# @@session.sq 100   1.31G   1.31G   1.31G   1.31G   1.31G       0   1.31G
# @@session.un 100       1       1       1       1       1       0       1
# error code     0       0       0       0       0       0       0       0
# String:
# @@session.co default
# @@session.ti '+08:00'
# Query_time distribution
#   1us
#  10us
# 100us
#   1ms
#  10ms
# 100ms
#    1s  ################################################################
#  10s+
BEGIN\G

猜你喜欢

转载自www.cnblogs.com/Coye/p/12957246.html
今日推荐