pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruce Momjian <pgman@candle.pha.pa.us>
To: Paul McGarry <PaulM@opentec.com.au>
Cc: 'Tom Lane' <tgl@sss.pgh.pa.us>
Cc: 'pgsql-sql@postgresql.org' <pgsql-sql@postgresql.org>
Subject: Re: Temp tables being written to disk. Avoidable?
Date: Wed, 15 Aug 2001 11:47:34 -0400 (EDT)
Message-ID: <200108151547.f7FFlYf22964@candle.pha.pa.us> (raw)
In-Reply-To: <F3FC09F8BCF8D411B73B00D0B7BD06E60F706E@otnrnsx1.opentec.com.au>

> 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, Pennsylvania 19026



view thread (6+ messages)  latest in thread

Message-ID: <200108151547.f7FFlYf22964@candle.pha.pa.us>
Permalink:  ../200108151547.f7FFlYf22964@candle.pha.pa.us/
Also on:    postgresql.org/message-id/200108151547.f7FFlYf22964@candle.pha.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: pgman@candle.pha.pa.us, PaulM@opentec.com.au, tgl@sss.pgh.pa.us
  Subject: Re: Temp tables being written to disk. Avoidable?
  In-Reply-To: <200108151547.f7FFlYf22964@candle.pha.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox