Re: confused about transactions and connection pools - Mailing list pgsql-jdbc

From Kris Jurka
Subject Re: confused about transactions and connection pools
Date
Msg-id Pine.BSO.4.63.0610311340001.7526@leary2.csoft.net
Whole thread Raw
In response to Re: confused about transactions and connection pools  (Oliver Jowett <oliver@opencloud.com>)
List pgsql-jdbc

On Wed, 1 Nov 2006, Oliver Jowett wrote:

> Tom Lane wrote:
>> I'm a bit
>> dubious that the prepared-statement machinery actually results in a win
>> compared to just issuing simple Query messages.
>
> The driver has no infrastructure for issuing simple Query messages in v3
> mode, and anyway we want to batch the BEGIN up with the query that follows
> it.
>

We could easily use QueryExecutor.QUERY_ONESHOT for these, but I'm not
sure what the point would be.  The 8.2 release can log this correctly so
I'm not sure why bother changing it for the 8.2 driver.  Some quick
testing shows that using ONESHOT results in a 4-5% hit using the attached
test case of a BEGIN; SELECT 1; COMMIT loop.

Kris Jurka

Attachment

pgsql-jdbc by date:

Previous
From: "Ludovic Orban"
Date:
Subject: Re: Postgres XA support
Next
From: Kris Jurka
Date:
Subject: Re: jdbc driver performance TODO