From: Michael Fuhr <mike@fuhr.org>
To: David Gagnon <dgagnon@siunik.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Performance problem on delete from for 10k rows. May takes 20 minutes through JDBC interface
Date: Tue, 15 Mar 2005 16:38:34 -0700
Message-ID: <20050315233834.GA68209@winnie.fuhr.org> (raw)
In-Reply-To: <42375281.9090102@siunik.com>
References: <42375281.9090102@siunik.com>
On Tue, Mar 15, 2005 at 04:24:17PM -0500, David Gagnon wrote:
> Il get this strange problem when deleting rows from a Java program.
> Sometime (For what I noticed it's not all the time) the server take
> almost forever to delete rows from table.
Do other tables have foreign key references to the table you're
deleting from? If so, are there indexes on the foreign key columns?
Do you have triggers or rules on the table?
Have you queried pg_locks during the long-lasting deletes to see
if the deleting transaction is waiting for a lock on something?
> I rememeber having tried to delete the content of my table (IC) from
> PgAdminIII and I took couples of seconds!!! Not minutes.
How many records did you delete in this case? If there are foreign
key references, how many records were in the referencing tables?
How repeatable is the disparity in delete time? A single test case
might have been done under different conditions, so it might not
mean much. No offense intended, but "I remember" doesn't carry as
much weight as a documented example.
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
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, dgagnon@siunik.com
Subject: Re: Performance problem on delete from for 10k rows. May takes 20 minutes through JDBC interface
In-Reply-To: <20050315233834.GA68209@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