Re: Delete query takes exorbitant amount of time

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Delete query takes exorbitant amount of time
Дата
Msg-id 22527.1112110310@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Delete query takes exorbitant amount of time  (Simon Riggs <simon@2ndquadrant.com>)
Ответы Re: Delete query takes exorbitant amount of time  (Simon Riggs <simon@2ndquadrant.com>)
Список pgsql-performance
Simon Riggs <simon@2ndquadrant.com> writes:
> If action is NO ACTION or RESTRICT then
>     we need to SELECT at most 1 row that matches the criteria
>     which means we can use LIMIT 1

> If action is CASCADE, SET NULL, SET DEFAULT then
>     we need to UPDATE or DELETE all rows that match the criteria
>     which means we musnt use LIMIT and need to use FOR UPDATE

Huh?  UPDATE/DELETE don't use FOR UPDATE.  I think you have failed
to break down the cases sufficiently.  In particular it matters which
side of the RI constraint you are working from ...

            regards, tom lane

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

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: Delete query takes exorbitant amount of time
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: Delete query takes exorbitant amount of time