Re: Strange delete behaviour

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Strange delete behaviour
Дата
Msg-id 2564.1122905622@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Strange delete behaviour  ("Renzo Kottmann" <renzo@tzi.de>)
Список pgsql-general
"Renzo Kottmann" <renzo@tzi.de> writes:
>     "t_annotation_ann_startnode_id_fkey" FOREIGN KEY (ann_startnode_id)
> REFERENCES t_node(node_global_id) MATCH FULL
>     "t_annotation_ann_endnode_id_fkey" FOREIGN KEY (ann_endnode_id)
> REFERENCES t_node(node_global_id) MATCH FULL

You need indexes on ann_startnode_id and ann_endnode_id.  There might be
some other missing indexes too --- check each of your foreign key
constraints.

Postgres doesn't force you to keep an index on the referencing side of a
foreign key ... but if you want deletes from the master table to be
fast, you'd better have one.

            regards, tom lane

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

Предыдущее
От: Michael Fuhr
Дата:
Сообщение: Re: Strange delete behaviour
Следующее
От: Peter Fein
Дата:
Сообщение: Schema Pivileges was Re: Alter privileges for all tables