Re: postmaster hangs on delete from

Поиск
Список
Период
Сортировка
От Alan Hodgson
Тема Re: postmaster hangs on delete from
Дата
Msg-id 200903130853.47652@hal.medialogik.com
обсуждение исходный текст
Ответ на postmaster hangs on delete from  (emsa@devdep.com)
Список pgsql-general
On Friday 13 March 2009, emsa@devdep.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

В списке pgsql-general по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: Inserting string with a " into an array using {} syntax ... possible?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Maximum transaction rate