X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id C8AC2D6892 for ; Mon, 7 Nov 2005 17:40:14 -0400 (AST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 69119-05 for ; Mon, 7 Nov 2005 21:40:12 +0000 (GMT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from nz.telogis.com (unknown [203.98.10.169]) by svr1.postgresql.org (Postfix) with ESMTP id 770E5D6834 for ; Mon, 7 Nov 2005 17:40:13 -0400 (AST) Received: from [192.168.3.1] ([192.168.3.1]) by nz.telogis.com with esmtp; Tue, 08 Nov 2005 10:40:08 +1300 id 006116D6.436FC9BD.00003B66 Message-ID: <436FC9B1.4000906@telogis.com> Date: Tue, 08 Nov 2005 10:40:01 +1300 From: Ralph Mason User-Agent: Thunderbird 1.4 (Windows/20050908) MIME-Version: 1.0 To: pgsql-performance@postgresql.org Subject: Re: Temporary Table References: <004101c5e3b0$ee534130$1e21100a@ghwk02002147> <20051107110719.GA7012@surnet.cl> In-Reply-To: <20051107110719.GA7012@surnet.cl> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0 required=5 tests=[none] X-Spam-Score: 0 X-Spam-Level: X-Archive-Number: 200511/125 X-Sequence-Number: 15382 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