pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Oliver Jowett <oliver@opencloud.com>
To: Josh Berkus <josh@agliodbs.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Prepared Statements vs. pgbouncer
Date: Sun, 30 Sep 2007 11:55:54 +1300
Message-ID: <46FED7FA.6060309@opencloud.com> (raw)
In-Reply-To: <46FE3B1A.7020603@agliodbs.com>
References: <20070929002513.GG3140@inuus.com>
	<46FDA4F2.8080507@opencloud.com>
	<20070929021522.GH3140@inuus.com>
	<24584.1191033096@sss.pgh.pa.us>
	<20070929072159.GI3140@inuus.com>
	<46FE3B1A.7020603@agliodbs.com>

Josh Berkus wrote:

> Actually, in that kind of an application, I don't see the theoretical 
> issue with S_1 being reused by different client connections.  In an 
> ideal world, this would give us de-facto shared prepared plans.  Or am I 
> misunderstanding the issue?

S_1 from client 1 might be a completely different query to S_1 from 
client 2. The JDBC driver just numbers statements sequentially as they 
are used.

> Also, should I understand that there now is no way in pgsql-jdbc to turn 
> prepared plans off, even if you want to?

Right, and there never has been something like that since the V3 code 
was first added back in the (7.4? 8.0?) driver. Named statements are 
part of the V3 protocol, the driver expects the full protocol to be 
available. As I said if you wanted you could do driver modifications to 
tell the V3 protocol layer never to use named statements if you really 
wanted to, but if you're talking to something that implements the full 
V3 protocol (like, um, a postgresql backend..) there's no need. There 
are already knobs which let you tune whether user-generated queries use 
named statements or not, mostly because there are potential performance 
differences (unnamed statements can benefit from knowing the actual 
parameter values). For internal driver-generated queries that has not 
been an issue in the past so there's no tuning knob for them.

-O



view thread (48+ messages)  latest in thread

Message-ID: <46FED7FA.6060309@opencloud.com>
Permalink:  ../46FED7FA.6060309@opencloud.com/
Also on:    postgresql.org/message-id/46FED7FA.6060309@opencloud.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: oliver@opencloud.com, josh@agliodbs.com
  Subject: Re: Prepared Statements vs. pgbouncer
  In-Reply-To: <46FED7FA.6060309@opencloud.com>
  References: <20070929002513.GG3140@inuus.com> <46FDA4F2.8080507@opencloud.com> <20070929021522.GH3140@inuus.com> <24584.1191033096@sss.pgh.pa.us> <20070929072159.GI3140@inuus.com> <46FE3B1A.7020603@agliodbs.com> <46FED7FA.6060309@opencloud.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox