tag:blogger.com,1999:blog-3437262335854972639.post4303448764867420614..comments2023-10-23T20:32:31.349+02:00Comments on The blog about 12wiki and other technical stuff: Using master and slave databases with Symfony 2 + DoctrineTom Maaswinkelhttp://www.blogger.com/profile/09653096635878748961noreply@blogger.comBlogger4125tag:blogger.com,1999:blog-3437262335854972639.post-64855203990304863382021-03-19T16:49:55.540+01:002021-03-19T16:49:55.540+01:00Yararlanabileceğiniz değerli bağlantılar:
1- ti...Yararlanabileceğiniz değerli bağlantılar:<br /><br /><br /><br />1- <a href="https://bit.ly/instagram-takipci-satin-al-instagram-takipci-satin-al" rel="nofollow">tiktok takipçi satın al</a><br /><br />2- <a href="https://bit.ly/instagram-ucuz-takipci" rel="nofollow">tiktok takipçi satın al</a><br /><br />3- <a href="https://takipcialdim.com" rel="nofollow">takipçi satın al</a><br /><br />4- <a href="https://bit.ly/takipci-satin-al-takipci-satin-al" rel="nofollow">tiktok takipçi satın al</a><br /><br />5- <a href="https://smmpaketleri.com" rel="nofollow">instagram mobil ödeme takipçi satın al</a>BEYZA ILIKANhttps://www.blogger.com/profile/03716472417722596457noreply@blogger.comtag:blogger.com,1999:blog-3437262335854972639.post-75116591961285406892017-04-22T11:39:53.588+02:002017-04-22T11:39:53.588+02:00Guys, as you can see on Doctrine doc, executeQuery...Guys, as you can see on Doctrine doc, executeQuery creates prepared statements so I think there isn't any problem:<br /><br />http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/data-retrieval-and-manipulation.html#using-prepared-statements<br /><br />executeQuery($sql, $params, $types) - Create a prepared statement for the passed SQL query, bind the given params with their binding types and execute the query. This method returns the executed prepared statement for iteration and is useful for SELECT statements.<br /><br />AlexAgileAnonymoushttps://www.blogger.com/profile/12249929823933324032noreply@blogger.comtag:blogger.com,1999:blog-3437262335854972639.post-9276345979172084302013-02-07T10:53:49.887+01:002013-02-07T10:53:49.887+01:00Hey Kuba,
the way around that is to use the keep_...Hey Kuba,<br /><br />the way around that is to use the keep_slave option.<br /><br />To improve performance I also added the following code to the MasterSlaveConnection class<br /><br /> public function executeQuery($query, array $params = array(), $types = array(), \Doctrine\DBAL\Cache\QueryCacheProfile $qcp = null)<br /> {<br /> $this->connect('slave');<br /> return parent::executeQuery($query,$params,$types,$qcp);<br /> }<br /><br /> public function getWrappedConnection()<br /> {<br /> $this->connect('slave');<br /> return parent::getWrappedConnection();<br /> }<br /><br /><br />This makes sure the slave connection is used for ALL read queries!Tom Maaswinkelhttps://www.blogger.com/profile/09653096635878748961noreply@blogger.comtag:blogger.com,1999:blog-3437262335854972639.post-91549880352818932772013-02-07T10:31:50.868+01:002013-02-07T10:31:50.868+01:00I was recently testing this setup and noticed it&#...I was recently testing this setup and noticed it's not perfect. Slave is only used with executeQuery(). As soon as your code calls something else, it switches to master. Unfortunately this includes prepared statements which makes the setup unusable in most scenarios.<br /><br />Check the MasterSlaveConnection source code: https://github.com/doctrine/dbal/blob/master/lib/Doctrine/DBAL/Connections/MasterSlaveConnection.phpKubahttps://www.blogger.com/profile/01261643914135203650noreply@blogger.com