pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ralph Mason <ralph.mason@telogis.com>
To: pgsql-performance@postgresql.org
Subject: Re: Temporary Table
Date: Tue, 08 Nov 2005 10:40:01 +1300
Message-ID: <436FC9B1.4000906@telogis.com> (raw)
In-Reply-To: <20051107110719.GA7012@surnet.cl>
References: <004101c5e3b0$ee534130$1e21100a@ghwk02002147>
	<20051107110719.GA7012@surnet.cl>

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




view thread (17+ messages)  latest in thread

Message-ID: <436FC9B1.4000906@telogis.com>
Permalink:  ../436FC9B1.4000906@telogis.com/
Also on:    postgresql.org/message-id/436FC9B1.4000906@telogis.com

 · 

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-performance@postgresql.org
  Cc: ralph.mason@telogis.com
  Subject: Re: Temporary Table
  In-Reply-To: <436FC9B1.4000906@telogis.com>

* 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