Bug #35225 Not possible to see SQL runtime per statement for slave SQL thread
Submitted: 11 Mar 2008 16:58
Reporter: Mark Leith Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Replication Severity:S4 (Feature request)
Version:All OS:Any
Assigned to: Assigned Account CPU Architecture:Any
Tags: slave, sql runtime

[11 Mar 2008 16:58] Mark Leith
Description:
Currently within SHOW PROCESSLIST the 'Time' column for the slave SQL thread always shows the 'seconds behind master' value - the same which is shown within SHOW SLAVE STATUS. 

Not only does this duplicate data across the two SHOW statements, it also gives you know good way of knowing how long a particular statement has been running for - when your slave is already some way behind. 

If we were to show the time values per statement (as is usual within SHOW PROCESSLIST), we could stop duplicating the data, and get more information about slave throughput as well. 

How to repeat:
o Create a master / slave
o stop the slave
o generate a lot of activity on the master for a number of hours
o start the slave
o note the 'time' value quickly - even with very fast INSERT statements the Time column will be large

Suggested fix:
Show per statement times within SHOW PROCESSLIST as other threads do