Re: Very slow DELETE on 4000 rows of 55000 row table

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Very slow DELETE on 4000 rows of 55000 row table
Дата
Msg-id 19114.1175750630@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Very slow DELETE on 4000 rows of 55000 row table  (Richard Broersma Jr <rabroersma@yahoo.com>)
Список pgsql-sql
Richard Broersma Jr <rabroersma@yahoo.com> writes:
>> But I DELETE all conflicting those rows prior to the slow DELETE, just
>> so the FK check is never hit.  Should I be looking at subverting the FK
>> check mechanism somehow?  The necessary index would be huge, and
>> relevant only on this particular operation which happens every few
>> months, if that.

> true, but without an index, it still has to scan the table just to be sure.

If this is only a once-in-awhile thing, maybe you could build the index,
do the deletes, drop the index ...
        regards, tom lane


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

Предыдущее
От: "A. Kretschmer"
Дата:
Сообщение: Re: slow query
Следующее
От: Tom Lane
Дата:
Сообщение: Re: slow query