MySQL Forums
Forum List  »  Replication

Re: How to see the queries executing by slave io thread
Posted by: Rick James
Date: November 06, 2014 09:21AM

SHOW PROCESSLIST will show the currently executing replication statement. If the statement is fast, you probably cannot catch it before it moves on.

Why do you need to see the statements? I ask because there may be another solution to your _real_ problem.

You mentioned I/O problems. Turn on log_slow_slave_statements. (I think your version is new enough to have that feature.) Then you can see the "slow" queries in the slowlog. Find an annoying statement, present SHOW CREATE TABLE to us; then we can discuss it further.

I suspect you have a lot of INDEXes, especially UNIQUE indexes, on the table. Rethink them.

Or, perhaps, you are doing UPDATEs that require a full table scan?

Or you have innodb_buffer_pool_size set to low. What is the value of that on the Slave, and how much RAM do you have?

Do you use "parallel" slave threads? If so, that could be adding to the issues. However, turning that off will slow down replication, which could be worse overall.

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: How to see the queries executing by slave io thread
1092
November 06, 2014 09:21AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.