Re: Temporary Table

From: Ralph Mason <ralph(dot)mason(at)telogis(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: Temporary Table
Date: 2005-11-07 21:40:01
Message-ID: 436FC9B1.4000906@telogis.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Alvaro Herrera wrote:
> Christian Paul B. Cosinas wrote:
>
>> Does Creating Temporary table in a function and NOT dropping them affects
>> the performance of the database?
>>
>
> The system will drop it automatically, so it shouldn't affect.
>
> What _could_ be affecting you if you execute that function a lot, is
> accumulated bloat in pg_class, pg_attribute, or other system catalogs.
> You may want to make sure these are vacuumed often.
>
>
The answer in my experience is a very loud YES YES YES

If you use lots of temporary tables you will grow and dirty your system
catalogs, so you need to be vacuuming them regularly also (pg_call,
pg_attribute) Otherwise your db will slow to a crawl after a while.

Ralph

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Craig A. James 2005-11-08 01:58:03 Expensive function and the optimizer
Previous Message Ralph Mason 2005-11-07 21:30:15 Figuring out which command failed