Re: Temp tables being written to disk. Avoidable?

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Paul McGarry <PaulM(at)opentec(dot)com(dot)au>
Cc: "'Tom Lane'" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "'pgsql-sql(at)postgresql(dot)org'" <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Temp tables being written to disk. Avoidable?
Date: 2001-08-15 15:47:34
Message-ID: 200108151547.f7FFlYf22964@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message fimbulvetr 2001-08-15 16:25:18 Re: `postgresql.conf' has wrong permissions???
Previous Message Josh Berkus 2001-08-15 15:10:36 Re: Re: Re: DateDiff, IsNull?