X-Original-To: pgsql-performance-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 6D0DB9FB2B1 for ; Tue, 19 Sep 2006 17:39:58 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 53897-10 for ; Tue, 19 Sep 2006 17:39:45 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from palunko.srce.hr (palunko.srce.hr [161.53.2.67]) by postgresql.org (Postfix) with ESMTP id DCD829FB286 for ; Tue, 19 Sep 2006 17:39:45 -0300 (ADT) Received: from [10.0.0.10] (cmung4456.cmu.carnet.hr [193.198.145.138]) by palunko.srce.hr (8.13.8/8.13.8) with ESMTP id k8JKdNMM007747; Tue, 19 Sep 2006 22:39:24 +0200 (CEST) Message-ID: <4510558E.7020205@fer.hr> Date: Tue, 19 Sep 2006 22:39:42 +0200 From: Ivan Voras User-Agent: Thunderbird 1.5.0.7 (Windows/20060909) MIME-Version: 1.0 To: Rod Taylor CC: pgsql-performance@postgresql.org Subject: Re: Optimizing DELETE References: <450FEF1A.4070106@fer.hr> <1158673987.71040.24.camel@home> In-Reply-To: <1158673987.71040.24.camel@home> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.55 on 161.53.2.67 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.006 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200609/256 X-Sequence-Number: 20942 Rod Taylor wrote: > On Tue, 2006-09-19 at 15:22 +0200, Ivan Voras wrote: >> I've just fired off a "DELETE FROM table" command (i.e. unfiltered >> DELETE) on a trivially small table but with many foreign key references >> (on similar-sized tables), and I'm waiting for it to finish. It's been >> 10 minutes now, which seems very excessive for a table of 9000 rows on a >> 3 GHz desktop machine. > > I would guess that a few of those referenced tables are missing indexes > on the referenced column. Yes, it was a pilot error :( Among the small and properly indexed referencing tables there was a seldom queried but huge log table.