Re: Very slow DELETEs with foreign keys - Mailing list pgsql-general

From Tom Lane
Subject Re: Very slow DELETEs with foreign keys
Date
Msg-id 4386.1454947131@sss.pgh.pa.us
Whole thread Raw
In response to Re: Very slow DELETEs with foreign keys  (Thom Brown <thom@linux.com>)
List pgsql-general
Thom Brown <thom@linux.com> writes:
> Yeah, there's no index on contacts.country, and that would certainly
> make the query acceptably quick, but I'm asking whether the
> non-indexed scenario is going about things the most efficient way,
> given what it has available to it.

[ shrug... ]  If you're up for nuking the entire existing foreign-key
infrastructure and starting over, you could think about doing things
some other way.  But you're not going to get to anyplace other than
"run a query for each deleted row" without a *lot* of work.

            regards, tom lane


pgsql-general by date:

Previous
From: Nguyễn Trần Quốc Vinh
Date:
Subject: Re: fast refresh materialized view
Next
From: "David G. Johnston"
Date:
Subject: Re: COALESCE requires NULL from scalar subquery has a type