"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