Bug #69944 Processlist shows Second Behind Master instead of Query time for Replication
Submitted: 7 Aug 2013 6:16 Modified: 6 Mar 2014 13:17
Reporter: Abhijit Buchake Email Updates:
Status: Verified Impact on me:
Category:MySQL Server: Replication Severity:S4 (Feature request)
Version:All Versions OS:Any
Assigned to: CPU Architecture:Any
Tags: PROCESSLIST, query time, replication, second behind master

[7 Aug 2013 6:16] Abhijit Buchake
'SHOW [FULL] PROCESSLIST' command returns seconds behind master value for the 'Time' field for the replication thread. This value could be viewed from SHOW SLAVE STATUS command and hence not needed here. Instead, time taken by query would be useful to track long running queries by replication thread on slave.

Sample output:
| Id  | User        | Host      | db           | Command | Time  | State                            | Info
| 422 | system user |           | mydatabase   | Connect | 82321 | Copying to tmp table             | INSERT INTO 

In the above sample output, 82321 seconds was the replication lag while the query hardly took few seconds to complete.


How to repeat:
Execute a long running query on master server and allow it to replicate on slave.
Execute SHOW PROCESSLIST command on the slave server.

Suggested fix:
Display actual time taken by the query for the 'Time' field in processlist for the Replication thread.
[6 Mar 2014 13:17] Arnaud Adant
Hi Abhijit,

Thank you for this reasonable feature request.

Please note that it works as documented :


I am going to open a documentation bug to document it properly here too :


Best regards,

Arnaud Adant