Re: confused about transactions and connection pools

From: Kris Jurka <books(at)ejurka(dot)com>
To: Oliver Jowett <oliver(at)opencloud(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, David Goodenough <david(dot)goodenough(at)btconnect(dot)com>, pgsql-jdbc(at)postgresql(dot)org
Subject: Re: confused about transactions and connection pools
Date: 2006-10-31 19:14:54
Message-ID: Pine.BSO.4.63.0610311340001.7526@leary2.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 Content-Type Size
Commit.java text/plain 622 bytes

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Kris Jurka 2006-10-31 19:32:05 Re: jdbc driver performance TODO
Previous Message Ludovic Orban 2006-10-31 15:51:36 Re: Postgres XA support