Re: Constraint question

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Constraint question
Дата
Msg-id 21805.1147661450@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Constraint question  (Enzo Daddario <enzo@pienetworks.com>)
Ответы Re: Constraint question  ("Jim C. Nasby" <jnasby@pervasive.com>)
Список pgsql-admin
Enzo Daddario <enzo@pienetworks.com> writes:
> I am now required the remove thousands of obsolete records from table
> "X" and even though I have removed all related rows in all related
> tables, the deletion of rows in table "X" is taking WAY TOO LONG.

You need to put indexes on the referencing columns.  Then start a fresh
session for doing the actual deletes (FK check plans are usually cached
per-session).

            regards, tom lane

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

Предыдущее
От: Enzo Daddario
Дата:
Сообщение: Constraint question
Следующее
От: "Gourish Singbal"
Дата:
Сообщение: increasing max_fsm_pages.