Re: Database Caching - Mailing list pgsql-hackers

From Karel Zak
Subject Re: Database Caching
Date
Msg-id 20020826103910.A19438@zf.jcu.cz
Whole thread Raw
In response to Re: Database Caching  ("J. R. Nield" <jrnield@usol.com>)
List pgsql-hackers
On Sun, Aug 25, 2002 at 09:35:24PM -0400, J. R. Nield wrote:
> I'm not sure about query result caching or 'relation caching', since the
> first would seem to run into problems with concurrent updates, and the
> second is sort-of what the buffer cache does.
> 
> Query plan caching sounds like a really good idea though. Neil Conway's
> PREPARE patch already does this for an individual backend. Do you think
> it would be hard to make it use shared memory, and check if a query has
> already been prepared by another backend? Maybe it could use something
> like a whitespace insensitive checksum for a shared hash key.
The original version of query plan cache allows exactly this. Butafter some discussion the shared memory usage in
qcachewas remove.
 
I think better and more robus solution is store cached planns inbackend memory and allows to run backend as persistent
(meansnotstartup/stop for each client connection).
 
   Karel

-- Karel Zak  <zakkr@zf.jcu.cz>http://home.zf.jcu.cz/~zakkr/C, PostgreSQL, PHP, WWW, http://docs.linux.cz,
http://mape.jcu.cz


pgsql-hackers by date:

Previous
From: Mario Weilguni
Date:
Subject: Re: Deadlock situation using foreign keys (reproduceable)
Next
From: Vince Vielhaber
Date:
Subject: Re: PostgreSQL 7.2.2 and docs