Re: Massive delete performance

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Massive delete performance
Дата
Msg-id 13905.1129040232@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Massive delete performance  ("Andy" <frum@ar-sd.net>)
Список pgsql-performance
"Andy" <frum@ar-sd.net> writes:
> EXPLAIN ANALYZE
> DELETE FROM report WHERE id_order IN
> ...

> Hash IN Join  (cost=3532.83..8182.33 rows=32042 width=6) (actual
> time=923.456..2457.323 rows=59557 loops=1)
> ...
> Total runtime: 456718.658 ms

So the runtime is all in the delete triggers.  The usual conclusion from
this is that there is a foreign key column pointing at this table that
does not have an index, or is not the same datatype as the column it
references.  Either condition will force a fairly inefficient way of
handling the FK deletion check.

            regards, tom lane

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

Предыдущее
От: Sven Willenberger
Дата:
Сообщение: Re: Performance on SUSE w/ reiserfs
Следующее
От: Alex Turner
Дата:
Сообщение: Re: Performance on SUSE w/ reiserfs