pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Paul van den Bogaard <Paul.Vandenbogaard@Sun.COM>
To: Oliver Jowett <oliver@opencloud.com>
Cc: Kris Jurka <books@ejurka.com>
Cc: Dave Cramer <pg@fastcrypt.com>
Cc: Josh Berkus <josh@agliodbs.com>
Cc: Heikki Linnakangas <heikki@enterprisedb.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Caching driver on pgFoundry?
Date: Thu, 06 Sep 2007 14:16:34 +0200
Message-ID: <F206674D-260E-4312-B5B2-DAFAFEADEB6D@Sun.COM> (raw)
In-Reply-To: <46DFCB12.4080605@opencloud.com>
References: <200709050825.27080.josh@agliodbs.com>
	<200709050911.09478.josh@agliodbs.com>
	<46DED76E.9050706@enterprisedb.com>
	<200709050937.29027.josh@agliodbs.com>
	<Pine.BSO.4.64.0709051313050.30413@leary.csoft.net>
	<8FD2948B-9513-4611-9310-908CA253EECD@fastcrypt.com>
	<Pine.BSO.4.64.0709051404440.13924@leary.csoft.net>
	<159CA908-A763-4FB0-824F-8DCF3A3DD22C@fastcrypt.com>
	<Pine.BSO.4.64.0709051422300.9654@leary.csoft.net>
	<B337BC1A-587D-44A7-8C3D-B68A378034DC@sun.com>
	<46DFC4ED.607@opencloud.com>
	<956CBA7B-8B02-4EFD-BAD1-99107E4A7242@Sun.COM>
	<46DFCB12.4080605@opencloud.com>


On 6-sep-2007, at 11:40, Oliver Jowett wrote:

> 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.

If all ISVs would do it intelligently than I would have been out of  
a  job :-). I definitely agree. There is only one who can (should)  
know best and that is the application writer. However I found this is  
a rare situation. On the other hand if you do not need this most  
optimal situation than indeed it would be very helpfull if this layer  
in between would do it for you.
>
> 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.

I think from an implementation point of view you can build in and/or  
directly on top the JDBC layer. From a performance point of view I do  
not expect a significant advantage for one or the other either.

--Paul

>
> -O

------------------------------------------------------------------------ 
---------------------
Paul van den Bogaard                                
Paul.vandenBogaard@sun.com
CIE -- Collaboration and ISV Engineering, Opensource Engineering group

Sun Microsystems, Inc                              phone:        +31  
334 515 918
Saturnus 1                                                  
extentsion: x (70)15918
3824 ME Amersfoort                                 mobile:       +31  
651 913 354
The Netherlands                                         
fax:            +31 334 515 001




view thread (50+ messages)  latest in thread

Message-ID: <F206674D-260E-4312-B5B2-DAFAFEADEB6D@Sun.COM>
Permalink:  ../F206674D-260E-4312-B5B2-DAFAFEADEB6D@Sun.COM/
Also on:    postgresql.org/message-id/F206674D-260E-4312-B5B2-DAFAFEADEB6D@Sun.COM

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: Paul.Vandenbogaard@Sun.COM, oliver@opencloud.com, books@ejurka.com, pg@fastcrypt.com, josh@agliodbs.com, heikki@enterprisedb.com
  Subject: Re: Caching driver on pgFoundry?
  In-Reply-To: <F206674D-260E-4312-B5B2-DAFAFEADEB6D@Sun.COM>
  References: <200709050825.27080.josh@agliodbs.com> <200709050911.09478.josh@agliodbs.com> <46DED76E.9050706@enterprisedb.com> <200709050937.29027.josh@agliodbs.com> <Pine.BSO.4.64.0709051313050.30413@leary.csoft.net> <8FD2948B-9513-4611-9310-908CA253EECD@fastcrypt.com> <Pine.BSO.4.64.0709051404440.13924@leary.csoft.net> <159CA908-A763-4FB0-824F-8DCF3A3DD22C@fastcrypt.com> <Pine.BSO.4.64.0709051422300.9654@leary.csoft.net> <B337BC1A-587D-44A7-8C3D-B68A378034DC@sun.com> <46DFC4ED.607@opencloud.com> <956CBA7B-8B02-4EFD-BAD1-99107E4A7242@Sun.COM> <46DFCB12.4080605@opencloud.com> <F206674D-260E-4312-B5B2-DAFAFEADEB6D@Sun.COM>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox