Re: RAM-only temporary tables

From: "Matthew T(dot) O'Connor" <matthew(at)zeut(dot)net>
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-06 00:06:35
Message-ID: 4912350B.5030906@zeut.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Kevin Grittner 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).
>
> If some circumstances don't make it feasible to always do this as a
> RAM-only operation, perhaps a clause could be added to the CREATE
> TEMPORARY TABLE syntax to specify this behavior along with whatever
> limitations on the temporary table are required for this to work.
> (For example, maybe this is only feasible if the table will be dropped
> by the end of the transaction?)

As someone else already pointed out you can put temp tables on a RAM
disk, but the larger issue is that temp tables still cause system table
churn which will always need to be on stable media.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2008-11-06 00:20:07 Re: Patch for ALTER DATABASE WITH TABLESPACE
Previous Message Bryce Cutt 2008-11-06 00:06:11 Re: Proposed Patch to Improve Performance of Multi-Batch Hash Join for Skewed Data Sets