Re: what is difference between LOCAL and GLOBAL TEMPTABLES in PostgreSQL

From: "Simon Riggs" <simon(at)2ndquadrant(dot)com>
To: "Gregory Stark" <stark(at)enterprisedb(dot)com>
Cc: "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com>, "Bruce Momjian" <bruce(at)momjian(dot)us>, "Jim C(dot) Nasby" <decibel(at)decibel(dot)org>, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Alvaro Herrera" <alvherre(at)commandprompt(dot)com>, "PostgreSQL-development" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: what is difference between LOCAL and GLOBAL TEMPTABLES in PostgreSQL
Date: 2007-07-05 06:34:14
Message-ID: 1183617254.5398.83.camel@ebony.site
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, 2007-07-04 at 22:27 +0100, Gregory Stark wrote:
> "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com> writes:

> > Catalog bloat is one unwanted effect. Second is different behave of
> > temp tables than other mayor rdbms, and uncomfortable work with temp
> > tables in stored procedures. Third argument for implementation of
> > global temp tables is full support of ANSI SQL,
>
> I think the ANSI concept of temporary tables which are defined once but give
> you a fresh empty work-space for each transaction only makes sense if you're
> thinking in terms of an OLTP environment. Otherwise you would just go ahead
> and do the DDL to create new tables for each query and not worry about the
> down-sides.
>
> The advantages of the ANSI temporary tables are all things you would worry
> about in an OLTP environment but not a data warehousing environment:

IIRC there were similar problems with temp table usage at many DW sites
using Teradata. The issue was about locking, specifically the access
rights required. We might have that problem, or not, but the issues
related to significant numbers of temp tables effect many types of
application., not just OLTP.
--
Simon Riggs
EnterpriseDB http://www.enterprisedb.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paesold 2007-07-05 07:30:17 Re: Still recommending daily vacuum...
Previous Message Gregory Stark 2007-07-05 06:26:49 Re: what is difference between LOCAL and GLOBAL TEMP TABLES in PostgreSQL