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
---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match