X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id BB0FF52EAF for ; Thu, 11 Aug 2005 04:03:32 -0300 (ADT) 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 88485-01 for ; Thu, 11 Aug 2005 07:03:28 +0000 (GMT) Received: from smtp-gw.fnbs.net.my (smtp-gw.fnbs.net.my [202.9.108.191]) by svr1.postgresql.org (Postfix) with ESMTP id 0199252EAB for ; Thu, 11 Aug 2005 04:03:26 -0300 (ADT) Received: from mail-std.fnbs.net.my (smtp-std.fnbs.net.my [202.9.108.197]) by fnsrvlx9.fnbs.net.my (SMTP Mailer) with ESMTP id 5F8C252B51 for ; Thu, 11 Aug 2005 15:03:25 +0800 (MYT) Received: from Beh (unverified [203.106.54.162]) by mail-std.fnbs.net.my (SurgeMail 3.0c2) with ESMTP id 17330523 for multiple; Thu, 11 Aug 2005 15:03:24 +0800 MYT Message-ID: <001001c59e42$c9e9cca0$a279640a@Beh> From: "Chun Yit(Chronos)" To: "Qingqing Zhou" , References: <002001c59e26$11bc5bf0$a279640a@Beh> Subject: Re: it is always delete temp table will slow down the postmaster? Date: Thu, 11 Aug 2005 15:03:30 +0800 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.038 tagged_above=0 required=5 tests=[AWL=0.038] X-Spam-Level: X-Archive-Number: 200508/110 X-Sequence-Number: 13857 ----- Original Message ----- From: "Qingqing Zhou" To: Sent: Thursday, August 11, 2005 2:37 PM Subject: Re: [PERFORM] it is always delete temp table will slow down the postmaster? > > ""Chun Yit(Chronos)"" writes >> >>hi, i got one situation here, i create one pl/pgsql function that using > temp table to store temporary data. >>wherever i execute my function, i need to delete all the data inside the > temp table, but this will slow down the >>searching function if i conitnue to run the server because old tuples are > not really clear if just using delete command. >>so i use drop table command and recreate the table. > > A better way to empty a table fast is "truncate table". > > Regards, > Qingqing > >sorry, but truncate table cannot use inside function, any other way ? >Regards >ivan > > > ---------------------------(end of broadcast)--------------------------- > TIP 3: Have you checked our extensive FAQ? > > http://www.postgresql.org/docs/faq > > > -- > No virus found in this incoming message. > Checked by AVG Anti-Virus. > Version: 7.0.338 / Virus Database: 267.10.5/68 - Release Date: 10/Aug/05 >