Search Postgresql Archives

Re: Strange delete behaviour

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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/

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux