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/