Re: Temp tables performance question

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Hannu Krosing <hannu(at)tm(dot)ee>
Cc: PostgreSQL HACKERS <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Temp tables performance question
Date: 2000-07-13 16:09:17
Message-ID: 29759.963504557@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hannu Krosing <hannu(at)tm(dot)ee> writes:
> I have a question about performance issues related to temporary tables.
> IIRC temporary tables were implemented as ordinary tables with some
> pre/post-processing to give them unique names so that they would not
> clash with similar-named tables from other sessions.

Right, there's basically no performance difference at all from ordinary
tables.

It'd be possible to have them go through the "local buffer manager"
for their entire lives, rather than only for the transaction in which
they are created, as happens for ordinary tables. This would avoid
at least some shared-buffer-manipulation overhead. I'm not sure it'd
buy a whole lot, but it probably wouldn't take much work to make it
happen, either.

I think it would be folly to try to make them use a different smgr or
avoid WAL; that'd require propagating differences between ordinary and
temp tables into way too many places.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2000-07-13 16:16:44 Re: Temp tables performance question
Previous Message Stephan Szabo 2000-07-13 16:01:18 Re: Questions relating to "modified while in use" messages