MySQL Replication and Slow Queries

PREVIOUS POST
NEXT POST

I just filed a bug regarding slow queries executed by replication thread are not being logged to the slow query log.

This is not a big deal but it is ugly little gotcha which I think few people know about. It is especially bad if you’re using tools to analyze slow query log to find what queries take up the most resources on your server – in certain configurations replication load itself may be very significant contributor.

But even if you do not, as I wrote in the bug report it is quite handy to have this information our where as query times on master and slave can be different in a lot of circumstances.

One more thing to consider – slow replication queries also identify replication lag, ie if you have query which ran 10 seconds on the slave and your replication is well loaded, this means at some point in time your replication lag was at least 10 seconds.

PREVIOUS POST
NEXT POST

Comments

  1. sonny says

    Hi

    I have encounter this issue when implement replication. On Master database transaction processing got dramatically slow down and threads connection went high.

    I would appreciate if any help on this… pls share that what information need from my end.

    Thanks in advance…

Leave a Reply

Your email address will not be published. Required fields are marked *