Skip site navigation (1) Skip section navigation (2)

Re: Prepared Statements vs. pgbouncer

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Oliver Jowett <oliver(at)opencloud(dot)com>
Cc: Paul Lindner <lindner(at)inuus(dot)com>, pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Prepared Statements vs. pgbouncer
Date: 2007-09-29 04:14:10
Message-ID: 25703.1191039250@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-jdbc
Oliver Jowett <oliver(at)opencloud(dot)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

In response to

Responses

pgsql-jdbc by date

Next:From: Oliver JowettDate: 2007-09-29 04:49:25
Subject: Re: Prepared Statements vs. pgbouncer
Previous:From: Oliver JowettDate: 2007-09-29 02:40:56
Subject: Re: Prepared Statements vs. pgbouncer

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group