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 DB322D6F08 for ; Tue, 11 Oct 2005 09:06:14 -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 37658-07 for ; Tue, 11 Oct 2005 12:06:10 +0000 (GMT) Received: from ar-sd.net (unknown [82.77.155.72]) by svr1.postgresql.org (Postfix) with ESMTP id EDEFDD6D71 for ; Tue, 11 Oct 2005 09:06:11 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by ar-sd.net (Postfix) with ESMTP id 39997215A9; Tue, 11 Oct 2005 14:50:06 +0300 (EEST) Received: from ar-sd.net ([127.0.0.1]) by localhost (linz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 10841-04; Tue, 11 Oct 2005 14:50:04 +0300 (EEST) Received: from forge (unknown [192.168.0.11]) by ar-sd.net (Postfix) with SMTP id B9430215A7; Tue, 11 Oct 2005 14:50:04 +0300 (EEST) Message-ID: <017601c5ce5c$219e1b10$0b00a8c0@forge> From: "Andy" To: "Sean Davis" , References: Subject: Re: Massive delete performance Date: Tue, 11 Oct 2005 15:05:52 +0300 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 ar-sd.net X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.226 required=5 tests=[AWL=0.176, FORGED_RCVD_HELO=0.05] X-Spam-Level: X-Archive-Number: 200510/188 X-Sequence-Number: 14956 > Do you have foreign key relationships that must be followed for cascade > delete? If so, make sure that you have indices on them. Yes I have such things. Indexes are on these fields. >> To be onest this delete is taking the longest time, but it involves about 10 tables. > Are you running > any type of vacuum after the whole process? What kind? Full vacuum. (cmd: vacuumdb -f) Is there any configuration parameter for delete speed up? ----- Original Message ----- From: "Sean Davis" To: "Andy" ; Sent: Tuesday, October 11, 2005 2:54 PM Subject: Re: [PERFORM] Massive delete performance > 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 > > >