Re: Postgresql Caching - Mailing list pgsql-hackers

From mark@mark.mielke.cc
Subject Re: Postgresql Caching
Date
Msg-id 20061015184146.GB20873@mark.mielke.cc
Whole thread Raw
In response to Re: Postgresql Caching  (Shane Ambler <pgsql@007Marketing.com>)
Responses Re: Postgresql Caching  (Shane Ambler <pgsql@007Marketing.com>)
List pgsql-hackers
On Mon, Oct 16, 2006 at 03:08:39AM +0930, Shane Ambler wrote:
> Just throwing some ideas around -
> What if we could do something like
> CREATE TABLESPACE myramcache LOCATION MEMORY(2GB);
> CREATE TABLE mycache (
> id as integer, data as varchar(50))
> USING TABLESPACE myramcache;
> INSERT INTO mycache SELECT id,data FROM myrealtable;
> ...
> You could setup a table in memory to contain known popular data, you 
> could also use this to create a temporary table in memory to speed up 
> multiple intermediate calculations without touching disks.

I'm not sure what this would save. If the table is read-only, there
shouldn't be writes happening. If it's small, and frequently accessed,
it should fit in the buffer cache.

None of this avoids the cost of query planning, or query execution.

Cheers,
mark

-- 
mark@mielke.cc / markm@ncf.ca / markm@nortel.com     __________________________
.  .  _  ._  . .   .__    .  . ._. .__ .   . . .__  | Neighbourhood Coder
|\/| |_| |_| |/    |_     |\/|  |  |_  |   |/  |_   | 
|  | | | | \ | \   |__ .  |  | .|. |__ |__ | \ |__  | Ottawa, Ontario, Canada
 One ring to rule them all, one ring to find them, one ring to bring them all                      and in the darkness
bindthem...
 
                          http://mark.mielke.cc/



pgsql-hackers by date:

Previous
From: mark@mark.mielke.cc
Date:
Subject: Re: Postgresql Caching
Next
From: Tom Lane
Date:
Subject: Re: [BUGS] BUG #2683: spi_exec_query in plperl returns column names which are not marked as UTF8