Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 1826E9FB3B4 for ; Thu, 1 Mar 2007 21:59:37 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-new, port 10024) with ESMTP id 78165-08 for ; Thu, 1 Mar 2007 21:59:34 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from net2.micro-automation.com (net2.micro-automation.com [64.7.141.29]) by postgresql.org (Postfix) with SMTP id 3CD799FB41B for ; Thu, 1 Mar 2007 21:59:34 -0400 (AST) Received: (qmail 22227 invoked from network); 2 Mar 2007 01:59:33 -0000 Received: from dcdsl.ebox.com (HELO ?192.168.1.14?) (davec@64.7.143.116) by net2.micro-automation.com with SMTP; 2 Mar 2007 01:59:33 -0000 In-Reply-To: <4077BF73-482B-46C8-B65D-2E1FD2465294@fastcrypt.com> References: <4077BF73-482B-46C8-B65D-2E1FD2465294@fastcrypt.com> Mime-Version: 1.0 (Apple Message framework v752.3) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Cc: List Content-Transfer-Encoding: 7bit From: Dave Cramer Subject: Re: statement caching proof of concept redux Date: Thu, 1 Mar 2007 20:59:29 -0500 To: Dave Cramer X-Mailer: Apple Mail (2.752.3) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200703/13 X-Sequence-Number: 16727 In June I posted this. Since then we have some real results so I'd like to solicit ideas from the group about implementing statement caching. First and foremost it would be off by default and have to be explicitly turned on. After that I'm wondering about parameters which would affect resources. Would we want connection/database/driver connection limits ? Do we do this by number of prepared statements ? Overall memory consumption ? Then there is aging of cached statements; any ideas on how to age them? Will they need to be invalidated after so much time ? Any and all ideas are welcome. I will post definitive results shortly. I've been promised them for a few days now. Dave On 19-Jun-06, at 12:55 PM, Dave Cramer wrote: > This is just proof of concept. More work has to be done to make it > build properly and work properly under different jdk's > > Couple of questions. > > 1) What to do if there are multiple concurrent requests per > connection for the same statement? > 1) we could just allow it > 2) we could return a non-cacheable preparedstatement > 3) throw an exception > > 2) Is it enough to cache prepared statements or should we cache > statements too? > > Note: this work is based completely on apache's dbcp statement > caching implementation and this will be noted in the final code. > > > > > > > ---------------------------(end of > broadcast)--------------------------- > TIP 2: Don't 'kill -9' the postmaster