Re: JDBC, prepared queries, and partitioning - Mailing list pgsql-jdbc

From Kris Jurka
Subject Re: JDBC, prepared queries, and partitioning
Date
Msg-id Pine.BSO.4.64.0802131737100.28484@leary.csoft.net
Whole thread Raw
In response to Re: JDBC, prepared queries, and partitioning  (Simon Riggs <simon@2ndquadrant.com>)
List pgsql-jdbc

On Wed, 13 Feb 2008, Simon Riggs wrote:

> But the code example shows explicit use of
>
> pgconn.setPrepareThreshold(5);
>
> which clearly does nothing, given the default setting of protocol V3.
>
> So the program shown only works as stated with 7.3, the last time the
> default connection protocol was v2.

No, you've got it all backwards.  prepareThreshold only does something
with V3.  With V2, you *never* get prepared execution and this setting
does nothing.  With V3, prepareThreshold switches between semi-prepared
and fully-prepared execution.  For most cases semi-prepared is equivalent
to not-prepared (just not for partitioning which didn't exist when this
parameter + documentation were added).

> Should we be asking for volunteers to overhaul the docs? I'm concerned
> that some important facts aren't just wrong, they've been wrong for 4+
> years. That's a pretty serious situation for customer performance as
> well as advocacy.
>

Help is always appreciated, but I fear we don't have a big pool of people
with the right knowledge to do it.

Kris Jurka

pgsql-jdbc by date:

Previous
From: Simon Riggs
Date:
Subject: Re: JDBC, prepared queries, and partitioning
Next
From: Simon Riggs
Date:
Subject: Re: JDBC, prepared queries, and partitioning