Re: How to speed up delete

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bendik Rognlien Johansen <bendik(dot)johansen(at)gmail(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: How to speed up delete
Date: 2005-07-07 14:02:25
Message-ID: 7517.1120744945@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Bendik Rognlien Johansen <bendik(dot)johansen(at)gmail(dot)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

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Steinar H. Gunderson 2005-07-07 14:03:00 Re: Surprizing performances for Postgres on Centrino
Previous Message Tom Lane 2005-07-07 13:59:33 Re: CURSOR slowes down a WHERE clause 100 times?