Received: from localhost (unknown [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 6D2F09F9BC7 for ; Thu, 6 Sep 2007 06:40:34 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 79489-09 for ; Thu, 6 Sep 2007 06:40:22 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from tremor.opencloud.co.nz (tremor.opencloud.co.nz [131.203.101.230]) by postgresql.org (Postfix) with ESMTP id 122459F9B74 for ; Thu, 6 Sep 2007 06:40:31 -0300 (ADT) Received: from 222-154-129-161.jetstream.xtra.co.nz ([222.154.129.161] helo=[10.1.1.3]) by tremor.opencloud.co.nz with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1ITDqY-00081J-8q; Thu, 06 Sep 2007 21:40:22 +1200 Message-ID: <46DFCB12.4080605@opencloud.com> Date: Thu, 06 Sep 2007 21:40:34 +1200 From: Oliver Jowett User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) MIME-Version: 1.0 To: Paul van den Bogaard CC: Kris Jurka , Dave Cramer , Josh Berkus , Heikki Linnakangas , pgsql-jdbc@postgresql.org Subject: Re: Caching driver on pgFoundry? References: <200709050825.27080.josh@agliodbs.com> <200709050911.09478.josh@agliodbs.com> <46DED76E.9050706@enterprisedb.com> <200709050937.29027.josh@agliodbs.com> <8FD2948B-9513-4611-9310-908CA253EECD@fastcrypt.com> <159CA908-A763-4FB0-824F-8DCF3A3DD22C@fastcrypt.com> <46DFC4ED.607@opencloud.com> <956CBA7B-8B02-4EFD-BAD1-99107E4A7242@Sun.COM> In-Reply-To: <956CBA7B-8B02-4EFD-BAD1-99107E4A7242@Sun.COM> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200709/54 X-Sequence-Number: 17476 Paul van den Bogaard wrote: > For the ones you > describe could it be that the dbase layer is just storage and not part > of the (critical) performance path? Right, in our case we keep all state in memory as the primary representation (and maybe replicated across a cluster) and some specific state is also asynchronously written to disk via a RDBMS so that it survives a cluster restart. Performance of the write-back step is still important as it affects things like our MTTR from a complete database+cluster failure, but it does not directly affect the call throughput / latency. > If the database related work is critical in performance/throughput than > caching is a welcome technology. Well no not necessarily because *statement caching does nothing that you can't do directly in your application anyway*. For example in our case we would get no additional benefit from statement caching because we (as a JDBC client) already hold on to statement objects that we know we're going to reuse, i.e. we're already doing our own caching, and smarter than a generic layer can do because we have better knowledge of how we use our queries. Statement caching is really a "go faster" switch when you don't want to (or cannot) optimize the application code, or where the exact query strings are unpredictable. But again it's not something that *has* to be implemented in the driver, as far as I can tell there's nothing there that can't be done by a layer between the client and the real driver. -O