Skip site navigation (1) Skip section navigation (2)

Re: Query meltdown: caching results

From: Gregory Stark <stark(at)enterprisedb(dot)com>
To: "Norman Peelman" <npeelman(at)cfl(dot)rr(dot)com>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Query meltdown: caching results
Date: 2008-02-26 17:26:34
Message-ID: 87zltnzl11.fsf@oxford.xeocode.com (view raw or flat)
Thread:
Lists: pgsql-general
"Norman Peelman" <npeelman(at)cfl(dot)rr(dot)com> writes:

>> My options are, as far as I can tell,
>>
>> 1) replace the Database PDO extending class with something else that
>> provides query results caching in PHP, or
>> 2) get Postgres itself to cache the results of queries to avoid
>> running them repeatedly during a session.

You might consider looking at memcached. One way to use it would be to have
the PHP application check for the cached object first and use it rather than
do any database queries. Then you can use pgmemcached to allow triggers to
invalidate cached objects whenever the underlying data changes. (Or you could
even just use pl/php to update or invalidate the cached object through the
same code library)

-- 
  Gregory Stark
  EnterpriseDB          http://www.enterprisedb.com
  Ask me about EnterpriseDB's Slony Replication support!

In response to

Responses

pgsql-general by date

Next:From: Colin WetherbeeDate: 2008-02-26 17:33:46
Subject: Re: [SQL] Deploying PostgreSQL on virtualized hardware
Previous:From: Tom LaneDate: 2008-02-26 17:18:43
Subject: Re: unnesesary sorting after Merge Full Join

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group