Re: In theory question - Mailing list pgsql-general

From Hannes Dorbath
Subject Re: In theory question
Date
Msg-id 4642C505.8080509@theendofthetunnel.de
Whole thread Raw
In response to Re: In theory question  (Erik Jones <erik@myemma.com>)
List pgsql-general
On 09.05.2007 17:30, Erik Jones wrote:
>> On 09.05.2007 16:13, Naz Gassiep wrote:
>> I think this is close to what MySQL's query cache does. The question
>> is if this should be the job of the DBMS and not another layer. At
>> least the pgmemcache author and I think that it's better done outside
>> the DBMS. See
>> http://people.FreeBSD.org/~seanc/pgmemcache/pgmemcache.pdf for the idea.
>
> I just read through that pdf.  How does implementing a memcached system
> with table triggers qualify as outside the database?

The point is to have the DBMS _invalidate_ an external Cache, not to
fill or use it.

Caching in that case should not be done for single SQL statements. You
should cache things that have been produced using that query, a rendered
part of an HTML page is an example.

Think of a news selection on your website, the pages changes when the
content of 2-3 tables in your database changes. Here you have the DBMS
clear the page from the cache and your application layer re-render it
and put the new version in the cache.


--
Regards,
Hannes Dorbath

pgsql-general by date:

Previous
From: Hannes Dorbath
Date:
Subject: Re: Replication for PG 8 recommendations
Next
From: Richard Huxton
Date:
Subject: Re: WAL file internals and why a 64 bit will not work on a 32 bit