performing mysql transactions with master and slave setup?
how do you deal with transactions when you have master and slave db setup? typically i do all the reads from slaves and writes from master but when performing transactions, it seems i need to do reads from master (the one which is performing 开发者_如何学JAVAthe transactions) and so i can't have all my transactions all in one place ...
im also using zend db multidb so i got a separate db instance for master and slave. whats the best way of approaching this?
There's nothing in MySQL that would prevent you from using the Master db instance for reads as well as writes. It won't hurt anything. For your transaction-based queries, I think you'll have to do so.
精彩评论