开发者

mysql replication : utilizing insert delayed

开发者 https://www.devze.com 2023-01-15 21:45 出处:网络
I have a batch database that i would like to replicate to a reporting database but the queries that run on the reporting database might be very long (execution time wise) to the point where they can c

I have a batch database that i would like to replicate to a reporting database but the queries that run on the reporting database might be very long (execution time wise) to the point where they can cause a deadlock (this is happening now because both batch and reporting applications are using the same DB) , i thought of changing the table's engines in the reporting database (the once that are replicated from batch) to mysiam and then somehow replicate with in开发者_如何学编程sert delayed and thus simulating somehow a "persist eventually" mechanism in mysql and as a result prioritize the reporting reads (they do allot of temp table creations) . can this be done on the replication client alone (i.e. : not touching the master queries , the batch does not insert with insert delayed) ? and is this a good solution ? thanks


You can just ignore any deadlock queries on your slave. The only queries that would affect your replication would be insert/update queries. A long-running SELECT query would only hog resources.

0

精彩评论

暂无评论...
验证码 换一张
取 消