From: | Michael Fuhr <mike(at)fuhr(dot)org> |
---|---|
To: | Renzo Kottmann <renzo(at)tzi(dot)de> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Strange delete behaviour |
Date: | 2005-08-01 12:55:43 |
Message-ID: | 20050801125543.GA51284@winnie.fuhr.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Mon, Aug 01, 2005 at 01:57:32PM +0200, Renzo Kottmann wrote:
> If I try a
>
> delete
> from t_node
> where node_doc_id = XX;
>
> from inside a plpgsql function
> ...
> The deletion does not finish after several minutes and the CPU is
> running at 100% all the time unless I stop postmaster. A select works
> normal and gives me around 2500 rows. Does anybody has an idea why this
> happens?
What happens if you execute the delete by itself, i.e., not from
inside a function? What output do you get if you connect to the
database with psql and execute "EXPLAIN ANALYZE DELETE ..."?
Do other tables have foreign key references to t_node? If so, are
there indexes on those tables' foreign key columns? How many records
are in t_node and any tables that reference it? Do you keep the
tables vacuumed and analyzed?
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
From | Date | Subject | |
---|---|---|---|
Next Message | John DeSoi | 2005-08-01 13:46:58 | Re: Alter privileges for all tables |
Previous Message | Gnanavel S | 2005-08-01 12:52:39 | Re: Strange delete behaviour |