Received: from localhost (unknown [200.46.204.183]) by developer.postgresql.org (Postfix) with ESMTP id A9C842E002C for ; Tue, 8 Apr 2008 16:43:20 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 33475-02 for ; Tue, 8 Apr 2008 16:43:14 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from lists.commandprompt.com (host-159.commandprompt.net [207.173.203.159]) by developer.postgresql.org (Postfix) with ESMTP id C91242E0059 for ; Tue, 8 Apr 2008 16:43:14 -0300 (ADT) Received: from perhan.alvh.no-ip.org (200-126-91-169.bk6-dsl.surnet.cl [200.126.91.169]) (authenticated bits=0) by lists.commandprompt.com (8.13.8/8.13.8) with ESMTP id m38Jhkkd013173 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 8 Apr 2008 12:43:49 -0700 Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id B903547C55; Tue, 8 Apr 2008 15:43:10 -0400 (CLT) Date: Tue, 8 Apr 2008 15:43:10 -0400 From: Alvaro Herrera To: samantha mahindrakar Cc: pgsql-performance@postgresql.org Subject: Re: Performance with temporary table Message-ID: <20080408194310.GP9062@alvh.no-ip.org> References: <20080408161745.GB9062@alvh.no-ip.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.17+20080114 (2008-01-14) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0 (lists.commandprompt.com [207.173.203.159]); Tue, 08 Apr 2008 12:43:50 -0700 (PDT) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200804/95 X-Sequence-Number: 29588 samantha mahindrakar escribió: > Well instead of creating a temp table everytime i just created a > permanant table and insert the data into it everytime and truncate it. > I created indexes on this permanent table too. This did improve the > performance to some extent. > > Does using permanant tables also bloat the catalog or hinder the performance? In terms of catalog usage, permanent tables behave exactly the same as temp tables. -- Alvaro Herrera http://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 support