pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Oliver Jowett <oliver@opencloud.com>
Cc: Paul Lindner <lindner@inuus.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Prepared Statements vs. pgbouncer
Date: Sat, 29 Sep 2007 00:14:10 -0400
Message-ID: <25703.1191039250@sss.pgh.pa.us> (raw)
In-Reply-To: <46FDBB38.40003@opencloud.com>
References: <20070929002513.GG3140@inuus.com>
	<46FDA4F2.8080507@opencloud.com>
	<20070929021522.GH3140@inuus.com>
	<46FDBB38.40003@opencloud.com>

Oliver Jowett <oliver@opencloud.com> writes:
> The driver uses server-side statements for frequently-used internal 
> utility commands such as BEGIN too, and the lifetime of those statements 
> is essentially "the whole connection", not a particular transaction.

I'm kinda hijacking the thread here, because this question is unrelated
to pgbouncer's behavior, but: have you ever done any performance
measurement to prove that preparing BEGIN/COMMIT/ROLLBACK is a good idea?
AFAICS there is only trivial parsing work to be saved, and no planning
work, and yet the overhead of storing and referencing a prepared
statement remains.  My gut feeling is that this is at best a wash and
could easily be a loss, particularly as of 8.3 which will have more
overhead to maintain prepared statements.

			regards, tom lane



view thread (48+ messages)  latest in thread

Message-ID: <25703.1191039250@sss.pgh.pa.us>
Permalink:  ../25703.1191039250@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/25703.1191039250@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, oliver@opencloud.com, lindner@inuus.com
  Subject: Re: Prepared Statements vs. pgbouncer
  In-Reply-To: <25703.1191039250@sss.pgh.pa.us>
  References: <20070929002513.GG3140@inuus.com> <46FDA4F2.8080507@opencloud.com> <20070929021522.GH3140@inuus.com> <46FDBB38.40003@opencloud.com> <25703.1191039250@sss.pgh.pa.us>

* 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