gerhard <g.hintermayer@xxxxxxxx> writes: > oops, should have thought about setting the foreign key constraint > deferrable, maybe showing this in table definition (\d) would be a > good idea. Don't think that'll make any difference. What *should* help is having an index on downtime_detail.downtimeid. As-is it's got to seqscan downtime_detail to look for rows to be cascade-deleted. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general