Re: RAM-only temporary tables

From: "Alex Hunsaker" <badalex(at)gmail(dot)com>
To: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: RAM-only temporary tables
Date: 2008-11-05 23:57:07
Message-ID: 34d269d40811051557na24a796m48dc367ebcc71973@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Nov 5, 2008 at 16:00, Kevin Grittner
<Kevin(dot)Grittner(at)wicourts(dot)gov> wrote:
> An idea for a possible enhancement to PostgreSQL: allow creation of a
> temporary table without generating any disk I/O. (Creating and
> dropping a three-column temporary table within a database transaction
> currently generates about 150 disk writes).

Well arguably you can already do this...

create tablespace ram location '/dev/shm/';
create temp table (junk int) tablespace ram;

In theory because only one backend needs the temp table we should be
able to use mmap() to fake it being a file as well without to much
trouble. But im sure I am missing something...

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bryce Cutt 2008-11-06 00:06:11 Re: Proposed Patch to Improve Performance of Multi-Batch Hash Join for Skewed Data Sets
Previous Message Tom Lane 2008-11-05 23:38:52 Re: A bug with ALTER TABLE SET WITHOUT OIDS in CVS HEAD