From: Michael Fuhr <mike@fuhr.org>
To: James Klo <jklo@arkitec.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: make bulk deletes faster?
Date: Sun, 18 Dec 2005 19:36:16 -0700
Message-ID: <20051219023616.GA89670@winnie.fuhr.org> (raw)
In-Reply-To: <jklo-C7336F.21104017122005@news.hub.org>
References: <jklo-C7336F.21104017122005@news.hub.org>
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
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-performance@postgresql.org
Cc: mike@fuhr.org, jklo@arkitec.com
Subject: Re: make bulk deletes faster?
In-Reply-To: <20051219023616.GA89670@winnie.fuhr.org>
* 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