pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Bryce Nesbitt <bryce1@obviously.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Very slow DELETE on 4000 rows of 55000 row table
Date: Tue, 03 Apr 2007 03:04:00 -0400
Message-ID: <21308.1175583840@sss.pgh.pa.us> (raw)
In-Reply-To: <4611EFE1.5010400@obviously.com>
References: <4611EFE1.5010400@obviously.com>

Bryce Nesbitt <bryce1@obviously.com> 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



view thread (5+ messages)  latest in thread

Message-ID: <21308.1175583840@sss.pgh.pa.us>
Permalink:  ../21308.1175583840@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/21308.1175583840@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: tgl@sss.pgh.pa.us, bryce1@obviously.com
  Subject: Re: Very slow DELETE on 4000 rows of 55000 row table
  In-Reply-To: <21308.1175583840@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox