Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 3C0FB475A8E for ; Fri, 23 Aug 2002 10:21:23 -0400 (EDT) Received: from 130.94.20.248 (unknown [130.94.20.248]) by postgresql.org (Postfix) with SMTP id 73B95475A71 for ; Fri, 23 Aug 2002 10:21:22 -0400 (EDT) Received: (qmail 17034 invoked by uid 0); 23 Aug 2002 14:21:25 -0000 Received: from unknown (HELO meta-bit.com) (202.224.226.116) by 130.94.28.46 with SMTP; 23 Aug 2002 14:21:25 -0000 Message-ID: <3D6644E2.2030707@meta-bit.com> Date: Fri, 23 Aug 2002 23:21:22 +0900 From: Alex Paulusberger User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:0.9.4.1) Gecko/20020508 Netscape6/6.2.3 X-Accept-Language: en-us MIME-Version: 1.0 To: Tom Lane Cc: pgsql-admin@postgresql.org Subject: Re: Performance Problems References: <3D663946.4050008@meta-bit.com> <19614.1030110585@sss.pgh.pa.us> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200208/280 X-Sequence-Number: 5394 Tom, thanks. I do use DELETE FROM since truncate is not an option in trnansaction blocks and within DBI , autocommit has to be turned off when connecting to the DB. But maybe you are right, and the overhead not being able to truncate tables is bigger than not using transaction blocks. Regards Alex Tom Lane wrote: >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 > >---------------------------(end of broadcast)--------------------------- >TIP 3: if posting/reading through Usenet, please send an appropriate >subscribe-nomail command to majordomo@postgresql.org so that your >message can get through to the mailing list cleanly > >