I have two MySQL servers configured in a multi-master replication setup. Each is a slave and master to the other. My application requires that some large queries be ran in the background, and the results of these queries would be used to populate a table. I figured, I could have these large queries run on one server, and the application front-end use the other. This way, the application wouldn't be slowed while the server is running these queries.
These queries are very large INSERT .... SELECT
. With my replication setup, it seems that when one server finishes the query, instead of just sending the INSERTs to the slave, it has the slave run the original large INSERT/SELECT.
Is this actually happening? Or is there a way to see what commands were sent to the slave from the master to verify this is the behavior? The only way I can tell is from CPU load.
Is there a way for the slave to only get the resulting INSERT from an INSERT... SELECT ran on the master?