Re: Postgresql Caching

From: mark(at)mark(dot)mielke(dot)cc
To: Shane Ambler <pgsql(at)007Marketing(dot)com>
Cc: Merlin Moncure <mmoncure(at)gmail(dot)com>, Anon Mous <soundami(at)yahoo(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Postgresql Caching
Date: 2006-10-15 18:41:46
Message-ID: 20061015184146.GB20873@mark.mielke.cc
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)mielke(dot)cc / markm(at)ncf(dot)ca / markm(at)nortel(dot)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 bind them...

http://mark.mielke.cc/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2006-10-15 19:02:38 Re: BUG #2683: spi_exec_query in plperl returns column names which are not marked as UTF8
Previous Message mark 2006-10-15 18:40:08 Re: Postgresql Caching