Re: JDBC, prepared queries, and partitioning

From: Kris Jurka <books(at)ejurka(dot)com>
To: Simon Riggs <simon(at)2ndquadrant(dot)com>
Cc: Josh Berkus <josh(at)agliodbs(dot)com>, PostgreSQL - JDBC <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: JDBC, prepared queries, and partitioning
Date: 2008-02-13 22:47:14
Message-ID: Pine.BSO.4.64.0802131737100.28484@leary.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Oliver Jowett 2008-02-13 22:55:05 Re: JDBC, prepared queries, and partitioning
Previous Message Stephen Denne 2008-02-13 22:38:27 Re: JDBC, prepared queries, and partitioning