replication question - connections on slave

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi

I have a replicated slave copy of my database. Our 6 year old - non modular web app does not have the connection selector for our PHP scripts, so PHP opens SQL queries to the default (last connection) made by the scripts. So if i open a connection to the slave somewhere, it would become the latest connection and would break write-queries that defaults to it.

I was wondering if there is a downfall to opening the slave connection first then master, so master would be default. But if there is no read queries on that page i specially direct to slave, the slave connection would be opened for nothing and simply close after script executes. Is this a horrible practice in terms of performance? 

thanks

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux