Re: on cascade delete performances, transaction and set constraints deferred

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: on cascade delete performances, transaction and set constraints deferred
Дата
Msg-id 3107.1219086961@sss.pgh.pa.us
обсуждение исходный текст
Ответ на on cascade delete performances, transaction and set constraints deferred  (Ivan Sergio Borgonovo <mail@webthatworks.it>)
Ответы Re: on cascade delete performances, transaction and set constraints deferred  (Ivan Sergio Borgonovo <mail@webthatworks.it>)
Список pgsql-general
Ivan Sergio Borgonovo <mail@webthatworks.it> writes:
> I'm not sure what's really happening but why apparently the delete
> statements get executed before the 2 inserts even if constraints are
> deferred?

You didn't mark the FK constraints as deferrable --- I'm pretty sure
the default is NOT DEFERRABLE.

> Why does it take so long?

Indexes on the FK columns would probably help.

            regards, tom lane

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

Предыдущее
От: Ivan Sergio Borgonovo
Дата:
Сообщение: on cascade delete performances, transaction and set constraints deferred
Следующее
От: Ivan Sergio Borgonovo
Дата:
Сообщение: Re: on cascade delete performances, transaction and set constraints deferred