You might have encountered situations where you had to kill some
specific select queries that were running for long periods
and choking the database. This post will go into more detail
with an example of report query offloading.
Report query (select) offloading to a slave server is a common
practice to reduce the workload of the master DB server. The long
running selects will be executed in the slave for report
generation. I have observed in many cases where the slave used to
get delayed or the slave DB encounters a slowdown due to some
heavy long-running orphaned selects from some wrong reports.
There are two … [Read more...]