pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Steve Atkins <steve@blighty.com>
To: pgsql-performance@postgresql.org
Subject: Re: Caching of Queries
Date: Mon, 27 Sep 2004 13:53:45 -0700
Message-ID: <20040927205345.GA29554@gp.word-to-the-wise.com> (raw)
In-Reply-To: <415875C0.3010805@ymogen.net>
References: <BAY18-DAV6m5UxP9Fek0002fd87@hotmail.com>
	<00e801c4a4b6$5526dd30$8300a8c0@solent>
	<330532b604092711591491303a@mail.gmail.com>
	<415875C0.3010805@ymogen.net>

On Mon, Sep 27, 2004 at 09:19:12PM +0100, Matt Clark wrote:

> >Basically you set a default in seconds for the HTML results to be
> >cached, and then have triggers set that force the cache to regenerate
> >(whenever CRUD happens to the content, for example).
> >
> >Can't speak for Perl/Python/Ruby/.Net/Java, but Cache_Lite sure made a
> >believer out of me!
> >
> > 
> >
> Nice to have it in a library, but if you want to be that simplistic then 
> it's easy in any language.  What if a process on server B modifies a n 
> important value that server A has cached though?  Coherency (albeit that 
> the client may choose to not use it) is a must for a general solution.

memcached is one solution designed for that situation. Easy to use
from most languages.  Works. Lets you use memory on systems where you
have it, rather than using up valuable database server RAM that's
better spent caching disk sectors.

Any competently written application where caching results would be a
suitable performance boost can already implement application or
middleware caching fairly easily, and increase performance much more
than putting result caching into the database would.

I don't see caching results in the database as much of a win for most
well written applications.  Toy benchmarks, sure, but for real apps it
seems it would add a lot of complexity, and violate the whole point of
using an ACID database.

(Caching parse trees or query plans, though? It'd be interesting to
 model what effect that'd have.)

Cheers,
  Steve




view thread (72+ messages)  latest in thread

Message-ID: <20040927205345.GA29554@gp.word-to-the-wise.com>
Permalink:  ../20040927205345.GA29554@gp.word-to-the-wise.com/
Also on:    postgresql.org/message-id/20040927205345.GA29554@gp.word-to-the-wise.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 using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: steve@blighty.com
  Subject: Re: Caching of Queries
  In-Reply-To: <20040927205345.GA29554@gp.word-to-the-wise.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