From: Mitch Pirtle <mitch.pirtle@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Neil Conway <neilc@samurai.com>
Cc: Aaron Werman <awerman@hotmail.com>
Cc: Scott Kirkwood <scottakirkwood@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Caching of Queries
Date: Mon, 27 Sep 2004 09:29:58 -0400
Message-ID: <330532b6040927062938c1d596@mail.gmail.com> (raw)
In-Reply-To: <18766.1096262336@sss.pgh.pa.us>
References: <b3dc511704092212502a2ddb09@mail.gmail.com>
<BAY9-DAV21Y1SWoBDys0000cef5@hotmail.com>
<1096261381.25688.741.camel@localhost.localdomain>
<18766.1096262336@sss.pgh.pa.us>
On Mon, 27 Sep 2004 01:18:56 -0400, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> IIRC, in our past threads on this topic, it was suggested that if you
> can tolerate not-necessarily-up-to-date results, you should be doing
> this sort of caching on the client side and not in the DB server at all.
> I wouldn't try that in a true "client" scenario, but when the DB client
> is application-server middleware, it would make some sense to cache in
> the application server.
I'd also like to add that when one of the Mambo community members
started running benchmarks of popular Content Management Systems
(CMS), the ones that implemented page-level caching were significantly
more scalable as a result of the decreased load on the database (and
application server, as a result):
http://forum.mamboserver.com/showthread.php?t=11782
Caching at the database level provides the smallest possible
performance boost (at least regarding caching), as caching the query
on the webserver (via ADOdb's query cache) avoids the database server
altogether; and page-level caching gives you the biggest possible
benefit.
Yes, you have to be careful how you cache your data, but for many
applications it is easy to implement a trigger that clears the cache
when certain data is updated.
-- Mitch
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: mitch.pirtle@gmail.com, tgl@sss.pgh.pa.us, neilc@samurai.com, awerman@hotmail.com, scottakirkwood@gmail.com
Subject: Re: Caching of Queries
In-Reply-To: <330532b6040927062938c1d596@mail.gmail.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