<?xml version="1.0" encoding="windows-1252"?>
<node id="513822" title="Re: Subclassing DBI and creating two connections" created="2005-12-03 11:29:14" updated="2005-12-03 06:29:14">
<type id="11">
note</type>
<author id="166227">
valdez</author>
<data>
<field name="doctext">
&lt;p&gt;I have the same setup and I suggest to write a wrapper around DBI that provides an handle for reading and one for writing; then use the read handle if you need to perform only reads, or use the write handle if you need to perform both writes and reads. The problem here is the time spent to replicate data from master to slave server: there is no warranty that you will be able to read from the slave the data written to the master few moments before.&lt;/p&gt;
&lt;p&gt;For a similar reason don't use &lt;code&gt;now()&lt;/code&gt; in any insert or update statement, because the slave will not use the same timestamp used on the master.&lt;/p&gt;
&lt;div class="pmsig"&gt;&lt;div class="pmsig-166227"&gt;
&lt;p&gt;Ciao, Valerio&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;</field>
<field name="root_node">
513654</field>
<field name="parent_node">
513654</field>
</data>
</node>
