Re: [JDBC] Prepared statement performance...

From: Maarten(dot)Boekhold(at)reuters(dot)com
To: Barry Lind <barry(at)xythos(dot)com>
Cc: ammulder(at)alumni(dot)princeton(dot)edu, Dave(at)micro-automation(dot)net, dmitry(at)openratings(dot)com, peter(dot)kovacs(at)sysdata(dot)siemens(dot)hu, pgsql-general(at)postgresql(dot)org, pgsql-jdbc(at)postgresql(dot)org
Subject: Re: [JDBC] Prepared statement performance...
Date: 2002-09-28 09:53:45
Message-ID: T5d9c8cdad1c407b70772c@reuters.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

<br><font size=2 face="sans-serif">On 09/27/2002 10:43:47 PM Barry Lind wrote:<br>
&gt; I think the real question here is when does it make sense to use server<br>
&gt; side prepared statements. &nbsp;In the little bit of testing I have done, I<br>
&gt; would say the answer is rarely. &nbsp;You need many factors to come into<br>
&gt; place for it to make sense to use server side prepared statements:<br>
&gt; <br>
&gt; 1) The statement needs to be big and complex such that there is<br>
&gt; significant overhead in the parsing and planning stages of execution.<br>
</font>
<br><font size=2 face="sans-serif">Hmm, don't know how this relates to PostgreSQL, but I've got an example to the contrary with Oracle (8.1.6).</font>
<br>
<br><font size=2 face="sans-serif">A collegue of mine is developing an application-specific dataloader which does a lot of simple select/update/insert statements. When he changed the (java/JDBC) code from using Statement to PreparedStatement, he got an instant 60% increase in performance.</font>
<br>
<br><font size=2 face="sans-serif">Maarten</font>
<CODE><FONT SIZE=3><BR>
<BR>
------------------------------------------------------------- ---<BR>
Visit our Internet site at http://www.reuters.com<BR>
<BR>
Any views expressed in this message are those of the individual<BR>
sender, except where the sender specifically states them to be<BR>
the views of Reuters Ltd.<BR>
</FONT></CODE>

Attachment Content-Type Size
unknown_filename text/html 1.4 KB

Browse pgsql-general by date

  From Date Subject
Next Message Martijn van Oosterhout 2002-09-28 12:13:02 Re: query speed depends on lifetime of frozen db?
Previous Message Alvaro Herrera 2002-09-28 04:46:00 Re: [SQL] function return multiply rows