You issue this command:
SHOW SLAVE STATUS -
In the output, there is a value for Seconds_behind_master.
How is this time calculated?
You issue this command:
SHOW SLAVE STATUS -
In the output, there is a value for Seconds_behind_master.
How is this time calculated?
The time value for Seconds_behind_master indicates the delay between the most recent transaction applied by a SQL thread on the slave and the time it was committed on the master. It essentially measures how
Not A, not the last transaction of the master. It deals with the current sql being applied. "difference between the current timestamp on the replica and the original timestamp logged on the source for the event currently being processed on the replica." So D. Time of slave and time it was run on the master, for the query just finished on the slave.
This field is an indication of how “late” the replica is: When the replica is actively processing updates, this field shows the difference between the current timestamp on the replica and the original timestamp logged on the source for the event currently being processed on the replica. When no event is currently being processed on the replica, this value is 0.