Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 58F109FB8EC for ; Tue, 3 Apr 2007 04:04:06 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 08773-01 for ; Tue, 3 Apr 2007 04:04:04 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 501D99FB226 for ; Tue, 3 Apr 2007 04:04:03 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id l33740ap021309; Tue, 3 Apr 2007 03:04:00 -0400 (EDT) To: Bryce Nesbitt cc: pgsql-sql@postgresql.org Subject: Re: Very slow DELETE on 4000 rows of 55000 row table In-reply-to: <4611EFE1.5010400@obviously.com> References: <4611EFE1.5010400@obviously.com> Comments: In-reply-to Bryce Nesbitt message dated "Mon, 02 Apr 2007 23:10:41 -0700" Date: Tue, 03 Apr 2007 03:04:00 -0400 Message-ID: <21308.1175583840@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200704/16 X-Sequence-Number: 28016 Bryce Nesbitt writes: > I've got a DELETE FROM that seems to run forever, pegging the CPU at > 100%. I can't figure out why it's slow. Any clues? Unindexed foreign key constraints pointing to this table, perhaps? EXPLAIN ANALYZE would give a great deal more clue than plain EXPLAIN. regards, tom lane