Re: 7.4 - FK constraint performance

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: 7.4 - FK constraint performance
Дата
Msg-id 4559.1076601260@sss.pgh.pa.us
обсуждение исходный текст
Ответ на 7.4 - FK constraint performance  (ow <oneway_111@yahoo.com>)
Ответы Re: 7.4 - FK constraint performance  (ow <oneway_111@yahoo.com>)
Список pgsql-sql
ow <oneway_111@yahoo.com> writes:
> When I try to delete record, it takes > 3 min.

I think it must be using a seqscan for the foreign key check query.
Could you try this and show the results?

prepare foo(my.dint) as
SELECT 1 FROM ONLY "my"."large" x WHERE "small_id" = $1 FOR UPDATE OF x;

explain analyze execute foo(239);

When I try it I see an indexscan plan, but maybe there's some aspect of
your setup that's causing problems.
        regards, tom lane


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

Предыдущее
От: Stephan Szabo
Дата:
Сообщение: Re: 7.4 - FK constraint performance
Следующее
От: ow
Дата:
Сообщение: Re: 7.4 - FK constraint performance