Search Postgresql Archives

Re: Strange delete behaviour

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Renzo Kottmann" <renzo@xxxxxx> 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

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux