X-Original-To: pgsql-jdbc-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 6A91F9FA5E1 for ; Mon, 19 Jun 2006 13:55:56 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 66261-02 for ; Mon, 19 Jun 2006 13:55:49 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from net2.micro-automation.com (net2.micro-automation.com [64.7.141.29]) by postgresql.org (Postfix) with SMTP id 68E1F9F9998 for ; Mon, 19 Jun 2006 13:55:49 -0300 (ADT) Received: (qmail 31707 invoked from network); 19 Jun 2006 16:55:47 -0000 Received: from dcdsl.ebox.com (HELO ?192.168.1.2?) (davec@64.7.143.116) by net2.micro-automation.com with SMTP; 19 Jun 2006 16:55:47 -0000 Mime-Version: 1.0 (Apple Message framework v750) To: List Message-Id: <4077BF73-482B-46C8-B65D-2E1FD2465294@fastcrypt.com> Content-Type: multipart/mixed; boundary=Apple-Mail-65-630254991 From: Dave Cramer Subject: statement caching proof of concept Date: Mon, 19 Jun 2006 12:55:46 -0400 X-Mailer: Apple Mail (2.750) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200606/47 X-Sequence-Number: 15327 --Apple-Mail-65-630254991 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed 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. --Apple-Mail-65-630254991 Content-Transfer-Encoding: 7bit Content-Type: application/octet-stream; x-unix-mode=0644; name="statementcache.diff" Content-Disposition: attachment; filename=statementcache.diff Index: build.xml =================================================================== RCS file: /usr/local/cvsroot/pgjdbc/pgjdbc/build.xml,v retrieving revision 1.69 diff -c -b -r1.69 build.xml *** build.xml 8 Jun 2006 10:34:50 -0000 1.69 --- build.xml 19 Jun 2006 16:41:18 -0000 *************** *** 155,160 **** --- 155,163 ---- + + + *************** *** 222,231 **** ! ! --- 225,234 ---- ! ! *************** *** 323,330 **** ! ! ! !