X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 7EBFFD6FA8 for ; Tue, 11 Oct 2005 08:54:42 -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 07655-09 for ; Tue, 11 Oct 2005 11:54:37 +0000 (GMT) Received: from wimpy.net.nih.gov (wimpy.net.nih.gov [128.231.88.106]) by svr1.postgresql.org (Postfix) with ESMTP id 89E57D6F96 for ; Tue, 11 Oct 2005 08:54:38 -0300 (ADT) Received: from wimpy.net.nih.gov (localhost [127.0.0.1]) by wimpy.net.nih.gov (8.12.11/8.11.7) with ESMTP id j9BBseLH009707 for ; Tue, 11 Oct 2005 07:54:42 -0400 (EDT) Received: from [128.231.145.14] (holmes.nhgri.nih.gov [128.231.145.14]) by wimpy.net.nih.gov (8.12.11/8.11.7) with ESMTP id j9BBsevU009698; Tue, 11 Oct 2005 07:54:40 -0400 (EDT) User-Agent: Microsoft-Entourage/10.1.4.030702.0 Date: Tue, 11 Oct 2005 07:54:39 -0400 Subject: Re: Massive delete performance From: Sean Davis To: Andy , Message-ID: In-Reply-To: <00bd01c5ce37$f8a4cc00$0b00a8c0@forge> Mime-version: 1.0 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.013 required=5 tests=[AWL=0.013] X-Spam-Level: X-Archive-Number: 200510/187 X-Sequence-Number: 14955 On 10/11/05 3:47 AM, "Andy" wrote: > Hi to all, > > I have the following problem: I have a client to which we send every night a > "dump" with a the database in which there are only their data's. It is a > stupid solution but I choose this solution because I couldn't find any better. > The target machine is a windows 2003. > > So, I have a replication only with the tables that I need to send, then I make > a copy of this replication, and from this copy I delete all the data's that > are not needed. > > How can I increase this DELETE procedure because it is really slow??? There > are of corse a lot of data's to be deleted. Do you have foreign key relationships that must be followed for cascade delete? If so, make sure that you have indices on them. Are you running any type of vacuum after the whole process? What kind? Sean