I have a huge database almost 5M records and its growing at a high speed. I have a Query for report generation which joins 4 tables and the time it takes is not pretty. I want to replicate my database on a slave instance and separate inserts and select. So when i select data it goes to master and on inserts goes to slave and replicates the data whenever either one is updated. Whats your suggestion on this.
Asked
Active
Viewed 51 times
0
-
Welcome to StackOverflow. Please note, this question is very similar to [the one you posted a couple of hours ago](http://stackoverflow.com/questions/16981860/mysql-scalability-master-slave-replication-a-good-idea-read-description-please). Instead of posting two very similar questions, please note you can edit a question. The present question could be considered a duplicate of the other one, and therefore is likely to be closed, and you might be flagged for multi-posting. – RandomSeed Jun 07 '13 at 13:19
1 Answers
1
In MySQL terminology, user insertions and updates are directed to the Master, such changes are then forwarded to the Slave (so it is the other way around).
If you want a bi-directional synchronisation, you will need to consider circular replication (here is a good tutorial).
The next step is clustering, but this is a bit more complex to handle.
![](../../users/profiles/1446005.webp)
RandomSeed
- 27,760
- 6
- 45
- 82