Received: from localhost (unknown [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 8BA369F9B4A for ; Thu, 30 Aug 2007 05:14:57 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 17400-05 for ; Thu, 30 Aug 2007 05:14:51 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from mail01.enterprisedb.com (mail01.enterprisedb.com [63.246.7.168]) by postgresql.org (Postfix) with ESMTP id 49E7F9F9EC6 for ; Thu, 30 Aug 2007 05:14:49 -0300 (ADT) thread-index: Acfq3d0bh+mF6ursR8q9dJY7NS/tYA== Received: from [192.168.1.36] ([81.107.192.247]) by mail01.enterprisedb.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.3959); Thu, 30 Aug 2007 04:15:01 -0400 Message-ID: <46D67C52.60902@enterprisedb.com> Date: Thu, 30 Aug 2007 09:14:10 +0100 Content-Class: urn:content-classes:message Importance: normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.4073 From: "Heikki Linnakangas" User-Agent: Icedove 1.5.0.12 (X11/20070730) MIME-Version: 1.0 To: "Dave Cramer" Cc: =?iso-8859-1?B?TOFzemzzIEhvcm554Ws=?= , "Paul van den Bogaard" , "Oliver Jowett" , "Kris Jurka" , "List" Subject: Re: statement caching patch from Laszlo Hornyak for review References: <2937D635-FCCB-471A-B1DA-AF0E0E0C18EB@fastcrypt.com> <46B1B5CE.1050409@opencloud.com> <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> In-Reply-To: <5A1478D3-8DBA-4FC2-B239-EE96A57A71C8@fastcrypt.com> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 30 Aug 2007 08:15:01.0375 (UTC) FILETIME=[DCA3E8F0:01C7EADD] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200708/101 X-Sequence-Number: 17414 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. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com