Using 5.5.38-35.2-log Percona Server, Release 35.2, Revision 674
We set the log slow time to 0, and captured a few minutes on our busy production system. Then, running pt-query-digest and sorting by query count, the most frequently executed query is “administrator command: Reset stmt”. It is executed 10 times more often than the highest application query. We do use prepared statements, so I see Prepare and Close, and have read up on when those are issued. I cannot find much documentation on Reset. I believe it is connected to the COM_STMT_RESET status variable. Under what circumstances is Reset used, what does it do, and is there anything that can be done to reduce the number of times it is executed (assuming I should be worried about that). Any links or info is appreciated.
Here is the pt-query digest output
Attribute pct total min max avg 95% stddev median
============ === ======= ======= ======= ======= ======= ======= =======
Count 23 1575177
Exec time 0 16s 3us 1ms 10us 13us 8us 9us
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
Rows affecte 0 0 0 0 0 0 0 0
Rows read 0 0 0 0 0 0 0 0
Bytes sent 0 16.52M 11 11 11 11 0 11
Merge passes 0 0 0 0 0 0 0 0
Tmp tables 0 0 0 0 0 0 0 0
Tmp disk tbl 0 0 0 0 0 0 0 0
Tmp tbl size 0 0 0 0 0 0 0 0
Query size 3 50.96M 33 33 33 33 0 33
String:
Databases xxx_… (1598474/101%)… 1858 more
Hosts
Last errno 0
Users xxx
Query_time distribution
1us ##################################################
10us ##################################################
100us
1ms
10ms
100ms
1s
10s+
administrator command: Reset stmt\G