Mysql – Should I write to MySQL slave (replica) for reporting


I intent to put reporting/analytics database on slave and run job scheduler every night to aggregate and insert data from operational database to reporting database.

Should I do this or I have to setup dedicated server for reporting/analytics database and use some tools to aggregate and insert data from slave to reporting server?

Thank for help,

Best Answer

I would do the nightly aggregation into a Summary Table on the Master. This abides by the principle that the Master and Slave are always in sync (within a slight delay). It also allows for multiple slaves to share the read load.