Re: Delete Enhancement Request

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Delete Enhancement Request
Дата
Msg-id 2613.1547516814@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Delete Enhancement Request  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список pgsql-admin
"David G. Johnston" <david.g.johnston@gmail.com> writes:
> On Mon, Jan 14, 2019 at 8:18 AM Campbell, Lance <lance@illinois.edu> wrote:
>> When deleting a large number of records with constraints and triggers PostgreSQL is exceptionally slow.

> You may wish to provide an explicit situation that you are
> experiencing so that others may offer their experienced insights as to
> whether you could be doing anything different to increase the speed of
> your deletes or techniques to batch them yourself.

Given the mention of constraints, I'm suspicious that the problem is
foreign key constraint(s) that lack an index on the referencing column(s).
PG will let you do that, but if you care about the speed of deletes on
the referenced table, you don't want to omit the index on the referencing
side.

            regards, tom lane


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

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: Delete Enhancement Request
Следующее
От: Thomas Kellerer
Дата:
Сообщение: Re: create tablespaces and users