Re: How to speed up delete - Mailing list pgsql-performance

From Tom Lane
Subject Re: How to speed up delete
Date
Msg-id 7517.1120744945@sss.pgh.pa.us
Whole thread Raw
In response to How to speed up delete  (Bendik Rognlien Johansen <bendik.johansen@gmail.com>)
Responses Re: How to speed up delete
List pgsql-performance
Bendik Rognlien Johansen <bendik.johansen@gmail.com> writes:
> I am running few of these deletes (could become many more) inside a
> transaction and each one takes allmost a second to complete.
> Is it because of the foreign key constraint, or is it something else?

You need an index on "original" to support that FK efficiently.  Check
for references from other tables to this one, too.

            regards, tom lane

pgsql-performance by date:

Previous
From: Tom Lane
Date:
Subject: Re: CURSOR slowes down a WHERE clause 100 times?
Next
From: "Steinar H. Gunderson"
Date:
Subject: Re: Surprizing performances for Postgres on Centrino