Re: How to speed up delete

From: PFC <lists(at)boutiquenumerique(dot)com>
To: "Bendik Rognlien Johansen" <bendik(dot)johansen(at)gmail(dot)com>, pgsql-performance(at)postgresql(dot)org
Subject: Re: How to speed up delete
Date: 2005-07-07 12:55:28
Message-ID: op.stjniqzbth1vuj@localhost
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Thu, 07 Jul 2005 13:16:30 +0200, Bendik Rognlien Johansen
<bendik(dot)johansen(at)gmail(dot)com> wrote:

> Hello,
> I was wondering if there is any way to speed up deletes on this table
> (see details below)?
> 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?
>
> Thanks!

Check your references : on delete, pg needs to find which rows to
cascade-delete, or set null, or restrict, in the tables which reference
this one. Also if this table references another I think it will lookup it
too. Do you have indexes for all this ?

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message PFC 2005-07-07 13:03:22 Re:
Previous Message Jean-Max Reymond 2005-07-07 12:49:05 Surprizing performances for Postgres on Centrino