Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 2F86F9FB4EB for ; Thu, 1 Mar 2007 23:17:32 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-new, port 10024) with ESMTP id 80029-10 for ; Thu, 1 Mar 2007 23:17:22 -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 7576B9FB463 for ; Thu, 1 Mar 2007 23:17:28 -0400 (AST) Received: (qmail 22778 invoked from network); 2 Mar 2007 03:17:27 -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 03:17:27 -0000 Mime-Version: 1.0 (Apple Message framework v752.3) In-Reply-To: References: <4077BF73-482B-46C8-B65D-2E1FD2465294@fastcrypt.com> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <8FEDC9B0-4E69-4478-A8CA-4F205856694D@fastcrypt.com> Content-Transfer-Encoding: 7bit From: Dave Cramer Subject: Re: statement caching proof of concept redux Date: Thu, 1 Mar 2007 22:17:26 -0500 To: List X-Mailer: Apple Mail (2.752.3) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200703/14 X-Sequence-Number: 16728 Statement caching results. I have some numbers although I can only share relative numbers. Statement caching provides a 40% increase in throughput. So I think this is worth doing. Dave On 1-Mar-07, at 8:59 PM, Dave Cramer wrote: > 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 > >