From: | Alan Hodgson <ahodgson(at)simkin(dot)ca> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: postmaster hangs on delete from |
Date: | 2009-03-13 15:53:47 |
Message-ID: | 200903130853.47652@hal.medialogik.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Friday 13 March 2009, emsa(at)devdep(dot)com wrote:
> Hi,
>
> I have a serious issue with delete from.
>
> When I do something like:
>
> "delete from CALC_INVOICE_DATA where PERIOD_END>='2011-01-01'"
>
> the postmaster takes 100% CPU and then nothing happens.
>
Some possibilities:
1) If it's using 100% CPU for a long period of time, you might have a
foreign key relationship to this table, and the key in the other (largish,
but not larger than RAM) table is not indexed, which is resulting in a seq
scan in cache for every row being deleted.
2) You have another on delete trigger that is expensive to run.
3) Some other backend is really using the 100% CPU and your delete is just
waiting for a lock on the table and not doing anything.
--
Even a sixth-grader can figure out that you can’t borrow money to pay off
your debt
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2009-03-13 16:23:43 | Re: Maximum transaction rate |
Previous Message | Alvaro Herrera | 2009-03-13 14:55:28 | Re: Inserting string with a " into an array using {} syntax ... possible? |