Re: Temp tables being written to disk. Avoidable? - Mailing list pgsql-sql

From Bruce Momjian
Subject Re: Temp tables being written to disk. Avoidable?
Date
Msg-id 200108151547.f7FFlYf22964@candle.pha.pa.us
Whole thread Raw
In response to RE: Temp tables being written to disk. Avoidable?  (Paul McGarry <PaulM@opentec.com.au>)
List pgsql-sql
> Hi Tom,
> 
> Thanks for your response, enlightening as always.
> 
> > Not at present --- temp tables are not different from real tables,
> > except for some naming shenanigans.  So creation of a temp table will
> > involve some disk hits.
> 
> Ok, would it be a good idea to modify that for the future? Given that
> temp tables:-
> a) can't be seen by other connections.
> b) are likely to be selected upon heavily close to creation time.
> c) are likely to be short lived.
> is there any reason to move them out to disk unless strictly
> necessary (aside from that it may take a fair bit of 
> re-engineering and the core developers have other more important 
> and/or more interesting things to be getting on with)?

If the temp table doesn't fit in memory, we will have to put it in
backing store somewhere, and a disk is the logical place, right?  I
don't see a huge advantage of putting it in memory.  We could prevent
WAL writes for temp tables.  That would help.

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


pgsql-sql by date:

Previous
From: "Jeff Barrett"
Date:
Subject: \set variant for use in regular sql commands
Next
From: "Bill"
Date:
Subject: Thanks