Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 14C1C475BD8 for ; Fri, 23 Aug 2002 09:49:43 -0400 (EDT) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id 3607E4759DF for ; Fri, 23 Aug 2002 09:49:42 -0400 (EDT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.5/8.12.5) with ESMTP id g7NDnjZM019615; Fri, 23 Aug 2002 09:49:45 -0400 (EDT) To: Alex Paulusberger Cc: pgsql-admin@postgresql.org Subject: Re: Performance Problems In-reply-to: <3D663946.4050008@meta-bit.com> References: <3D663946.4050008@meta-bit.com> Comments: In-reply-to Alex Paulusberger message dated "Fri, 23 Aug 2002 22:31:50 +0900" Date: Fri, 23 Aug 2002 09:49:45 -0400 Message-ID: <19614.1030110585@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200208/278 X-Sequence-Number: 5392 Another thought... Alex Paulusberger writes: > The whole process loops 4,500 times. > For every loop > - a temp table is cleared How exactly are you clearing the temp table? DELETE FROM isn't a good plan because you'll still have dead tuples in there. You could do a DELETE FROM and then VACUUM, but I'd suggest TRUNCATE instead. regards, tom lane