From: Dave Cramer <pg@fastcrypt.com>
To: Heikki Linnakangas <heikki@enterprisedb.com>
Cc: List <pgsql-jdbc@postgresql.org>
Subject: Re: statement caching patch from Laszlo Hornyak for review
Date: Thu, 30 Aug 2007 07:42:16 -0400
Message-ID: <B618424F-07F2-4E57-9F62-73AE0B988A67@fastcrypt.com> (raw)
In-Reply-To: <46D67C52.60902@enterprisedb.com>
References: <2937D635-FCCB-471A-B1DA-AF0E0E0C18EB@fastcrypt.com>
<46B1B5CE.1050409@opencloud.com>
<Pine.BSO.4.64.0708021252420.14791@leary.csoft.net>
<33E43614-DF0E-4913-92DB-2E8EC4B1E156@fastcrypt.com>
<46B3B590.5060600@opencloud.com>
<531718e20708032347q87bf7efs11e748cbb61847aa@mail.gmail.com>
<670726BC-C614-41DA-B1F3-03DC49441690@sun.com>
<809bf8d30708100104r1d5de68ey8d553173090874a1@mail.gmail.com>
<809bf8d30708100309n7f49e1bau933e762029442700@mail.gmail.com>
<5A1478D3-8DBA-4FC2-B239-EE96A57A71C8@fastcrypt.com>
<46D67C52.60902@enterprisedb.com>
On 30-Aug-07, at 4:14 AM, Heikki Linnakangas wrote:
> Dave Cramer wrote:
>> I just noticed this:
>>
>> Now that JDBC 4 has a notion of pooling built right into the
>> statement
>> interface it is clear (to me at least) that the implementation
>> belongs
>> in the driver.
>
> In chapter 11.6, "Reuse of Statements by Pooled Connection", the
> spec says:
>
>> In FIGURE 11-2, the connection pool and statement pool are
>> implemented by the
>> application server. However, this functionality could also be
>> implemented by the
>> driver or underlying data source. This discussion of statement
>> pooling is meant to
>> allow for any of these implementations.
>
> The new methods added in JDBC4, setPoolable and isPoolable are for use
> by applications to hint the connection pool implementation which
> statements it should try to pool. Statements are poolable by
> default, so
> it's really for telling the pool not to bother pooling one off
> queries.
>
> I still don't think it's wise for us to bundle a statement cache in
> the
> driver. If we had a server-side statement cache, or if there was some
> other PostgreSQL specific trick we could take advantage of, it would
> make sense to provide an interface for it. But there isn't.
Well, that's yet to be discovered. We are in the process of making a
wrapper driver which we will test for speed.
If the same throughput can't be achieved due to the overhead of
proxying the calls then there is a good argument for providing
statement caching inside the driver.
Dave
>
> --
> Heikki Linnakangas
> EnterpriseDB http://www.enterprisedb.com
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: pg@fastcrypt.com, heikki@enterprisedb.com
Subject: Re: statement caching patch from Laszlo Hornyak for review
In-Reply-To: <B618424F-07F2-4E57-9F62-73AE0B988A67@fastcrypt.com>
References: <2937D635-FCCB-471A-B1DA-AF0E0E0C18EB@fastcrypt.com> <46B1B5CE.1050409@opencloud.com> <Pine.BSO.4.64.0708021252420.14791@leary.csoft.net> <33E43614-DF0E-4913-92DB-2E8EC4B1E156@fastcrypt.com> <46B3B590.5060600@opencloud.com> <531718e20708032347q87bf7efs11e748cbb61847aa@mail.gmail.com> <670726BC-C614-41DA-B1F3-03DC49441690@sun.com> <809bf8d30708100104r1d5de68ey8d553173090874a1@mail.gmail.com> <809bf8d30708100309n7f49e1bau933e762029442700@mail.gmail.com> <5A1478D3-8DBA-4FC2-B239-EE96A57A71C8@fastcrypt.com> <46D67C52.60902@enterprisedb.com> <B618424F-07F2-4E57-9F62-73AE0B988A67@fastcrypt.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