Re: make bulk deletes faster? - Mailing list pgsql-performance

From Michael Fuhr
Subject Re: make bulk deletes faster?
Date
Msg-id 20051219023616.GA89670@winnie.fuhr.org
Whole thread Raw
In response to make bulk deletes faster?  (James Klo <jklo@arkitec.com>)
List pgsql-performance
On Sat, Dec 17, 2005 at 09:10:40PM -0800, James Klo wrote:
> I'd like some suggestions on how to get the deletes to happen faster, as
> while deleting individually appears to extremely fast, when I go to
> delete lots of rows the operation takes an extremely long time to
> complete (5000 rows takes about 3 minutes, 1000000 rows takes almost
> close to 4 hours or more depending upon server load; wall time btw).

Those times do seem excessive -- do any other tables have foreign
key references to the table you're deleting from?  If so, do those
tables have indexes on the referring columns?  Does this table or
any referring table have triggers?  Also, are you regularly vacuuming
and analyzing your tables?  Have you examined pg_locks to see if
an unacquired lock might be slowing things down?

--
Michael Fuhr

pgsql-performance by date:

Previous
From: Simon Riggs
Date:
Subject: Re: Should Oracle outperform PostgreSQL on a complex
Next
From: "Scott Marlowe"
Date:
Subject: Re: PostgreSQL and Ultrasparc T1