Lists: | pgsql-performance |
---|
From: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
---|---|
To: | "Christian Paul B(dot) Cosinas" <cpc(at)cybees(dot)com> |
Cc: | pgsql-performance(at)postgresql(dot)org |
Subject: | Re: Temporary Table |
Date: | 2005-11-07 11:07:20 |
Message-ID: | 20051107110719.GA7012@surnet.cl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-performance |
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.
--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
From: | "Christian Paul B(dot) Cosinas" <cpc(at)cybees(dot)com> |
---|---|
To: | <pgsql-performance(at)postgresql(dot)org> |
Subject: | Temporary Table |
Date: | 2005-11-07 15:35:49 |
Message-ID: | 004101c5e3b0$ee534130$1e21100a@ghwk02002147 |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-performance |
Does Creating Temporary table in a function and NOT dropping them affects
the performance of the database?
I choose Polesoft Lockspam to fight spam, and you?
http://www.polesoft.com/refer.html
I choose Polesoft Lockspam to fight spam, and you?
http://www.polesoft.com/refer.html
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 |
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