I’m trying to use pt-query-digest v2.2.7 to analyze my slow query log from standard mysql 5.5.33.
I’m not sure if I’m doing something wrong but I don’t see a query fingerprint in the output.
Also it seems to not be normalizing some queries.
Here is some output of two queries that I think should be the same.
The only difference is whitespace
Query 7: 0.88 QPS, 0.00x concurrency, ID 0x76B57ADEE69582FD at byte 74429
This item is included in the report because it matches --limit.
Scores: V/M = 0.00
Time range: 2014-03-11 15:11:05 to 15:11:31
Attribute pct total min max avg 95% stddev median
============ === ======= ======= ======= ======= ======= ======= =======
Count 5 23
Exec time 4 2ms 39us 128us 66us 84us 21us 66us
Lock time 0 0 0 0 0 0 0 0
Rows sent 0 0 0 0 0 0 0 0
Rows examine 0 0 0 0 0 0 0 0
Query size 3 1.24k 54 59 55.26 56.92 1.61 54.21
String:
Databases idx_acnt
Hosts web11.idx… (16/69%), web01.idx… (7/30%)
Users idx_user
Query_time distribution
1us
10us
100us
1ms
10ms
100ms
1s
10s+
Tables
SHOW TABLE STATUS FROM idx_acnt
LIKE ‘mls_info’\G
SHOW CREATE TABLE idx_acnt
.mls_info
\G
EXPLAIN /!50100 PARTITIONS/
SELECT * FROM mls_info WHERE mls_id=‘CA-SACMLS’ LIMIT 1\G
Query 37: 0.50 QPS, 0.00x concurrency, ID 0xCE60EAE3FCAD414D at byte 60854
This item is included in the report because it matches --limit.
Scores: V/M = 0.00
Time range: 2014-03-11 15:11:27 to 15:11:31
Attribute pct total min max avg 95% stddev median
============ === ======= ======= ======= ======= ======= ======= =======
Count 0 2
Exec time 0 155us 76us 79us 77us 79us 2us 77us
Lock time 0 0 0 0 0 0 0 0
Rows sent 0 0 0 0 0 0 0 0
Rows examine 0 0 0 0 0 0 0 0
Query size 0 114 57 57 57 57 0 57
String:
Databases idx_acnt
Hosts web11.idx.dev
Users idx_user
Query_time distribution
1us
10us
100us
1ms
10ms
100ms
1s
10s+
Tables
SHOW TABLE STATUS FROM idx_acnt
LIKE ‘mls_info’\G
SHOW CREATE TABLE idx_acnt
.mls_info
\G
EXPLAIN /!50100 PARTITIONS/
SELECT * FROM mls_info WHERE mls_id = ‘CA-SACMLS’ LIMIT 1\G
I don’t know why these queries are not being considered to be the same query.
Also how can I see the fingerprint of the queries.
Thanks