From: Oliver Jowett <oliver@opencloud.com>
To: Thomas Finneid <tfinneid@fcon.no>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: pooled prepared statements
Date: Wed, 13 May 2009 12:44:08 +1200
Message-ID: <4A0A17D8.5020808@opencloud.com> (raw)
In-Reply-To: <4A0978A3.6030900@fcon.no>
References: <4A0978A3.6030900@fcon.no>
Thomas Finneid wrote:
> When a PreparedStatment is created by a pooled connection, as far as I
> understand if, that creation happens on the server side, and a
> reference, of sorts, is returned to the client jdbc.
More or less, yes. (Assuming you're reusing the statement, not just
using it once and discarding it).
> Is that prepared statement shared among the connections or is it only
> available to that single connection?
It is associated only with the connection that prepared the statement.
The preparation of the statement on the server side is state that's
specific to the connection, and it's not shared between server backend
processes - so the JDBC driver couldn't share statements between
connections even if it wanted to.
> and more importantly, can many
> connections use that prepared statement concurrently?
No.
-O
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: oliver@opencloud.com, tfinneid@fcon.no
Subject: Re: pooled prepared statements
In-Reply-To: <4A0A17D8.5020808@opencloud.com>
References: <4A0978A3.6030900@fcon.no> <4A0A17D8.5020808@opencloud.com>
* 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