Re: Prepared Statements vs. pgbouncer - Mailing list pgsql-jdbc

From Tom Lane
Subject Re: Prepared Statements vs. pgbouncer
Date
Msg-id 25703.1191039250@sss.pgh.pa.us
Whole thread Raw
In response to Re: Prepared Statements vs. pgbouncer  (Oliver Jowett <oliver@opencloud.com>)
Responses Re: Prepared Statements vs. pgbouncer  (Oliver Jowett <oliver@opencloud.com>)
List pgsql-jdbc
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

pgsql-jdbc by date:

Previous
From: Oliver Jowett
Date:
Subject: Re: Prepared Statements vs. pgbouncer
Next
From: Oliver Jowett
Date:
Subject: Re: Prepared Statements vs. pgbouncer