Re: Bind message

From: "Guy Rouillier" <guyr(at)masergy(dot)com>
To: <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Bind message
Date: 2006-09-25 21:28:55
Message-ID: D4D1632DC736E74AB95FE78CD609007923B0F9@mtxexch01.add0.masergy.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Kris Jurka wrote:
> On Mon, 25 Sep 2006, Guy Rouillier wrote:
>
>> Dave Cramer wrote:
>>>
>>> The default is not to re-use statements, you have add
>>> prepareThreshold=n to the url where n is greater than 0. What this
>>> means is that after n times of use the prepared statement will be
>>> re-used..
>>
>> That's peculiar. The whole point of prepared statements is to obtain
>> the optimization of statement reuse.
>
> we want to be sure that people will actually be reusing these
> statements before switching to this mode. I believe the default
> prepareThreshold is set to 5 despite what the documentation says.

If true, that's a good compromise. It addresses the use of prepared
statements for purposes other than optimization that both you and Mark
mention, but doesn't unwittingly bite the programmer who has a statement
he intends to execute 1000 times and tries to do the right thing by
using a prepared statement.

--
Guy Rouillier

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Oliver Jowett 2006-09-25 21:42:57 Re: Bind message
Previous Message Markus Schaber 2006-09-25 21:14:24 Re: Bind message