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 6056E52EB5 for ; Thu, 11 Aug 2005 03:39:53 -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 19197-09 for ; Thu, 11 Aug 2005 06:39:49 +0000 (GMT) Received: from floppy.pyrenet.fr (floppy.pyrenet.fr [194.116.145.2]) by svr1.postgresql.org (Postfix) with ESMTP id EB75452EB2 for ; Thu, 11 Aug 2005 03:39:48 -0300 (ADT) Received: by floppy.pyrenet.fr (Postfix, from userid 106) id 7C3663095A; Thu, 11 Aug 2005 08:49:47 +0200 (MET DST) From: "Qingqing Zhou" X-Newsgroups: pgsql.performance Subject: Re: it is always delete temp table will slow down the postmaster? Date: Thu, 11 Aug 2005 14:37:20 +0800 Organization: Hub.Org Networking Services Lines: 17 Message-ID: References: <002001c59e26$11bc5bf0$a279640a@Beh> Reply-To: "Qingqing Zhou" X-Complaints-To: usenet@news.hub.org X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1506 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506 To: pgsql-performance@postgresql.org X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=1.185 tagged_above=0 required=5 tests=[AWL=-0.000, PRIORITY_NO_NAME=1.185] X-Spam-Level: * X-Archive-Number: 200508/109 X-Sequence-Number: 13856 ""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