pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PFC <lists@boutiquenumerique.com>
To: Bendik Rognlien Johansen <bendik.johansen@gmail.com>
To: pgsql-performance@postgresql.org
Subject: Re: How to speed up delete
Date: Thu, 07 Jul 2005 14:55:28 +0200
Message-ID: <op.stjniqzbth1vuj@localhost> (raw)
In-Reply-To: <6F239216-7936-4E62-B708-46DC9171649C@gmail.com>
References: <6F239216-7936-4E62-B708-46DC9171649C@gmail.com>

On Thu, 07 Jul 2005 13:16:30 +0200, Bendik Rognlien Johansen  
<bendik.johansen@gmail.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 ?



view thread (4+ messages)  latest in thread

Message-ID: <op.stjniqzbth1vuj@localhost>
Permalink:  ../op.stjniqzbth1vuj@localhost/
Also on:    postgresql.org/message-id/op.stjniqzbth1vuj@localhost

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: lists@boutiquenumerique.com, bendik.johansen@gmail.com
  Subject: Re: How to speed up delete
  In-Reply-To: <op.stjniqzbth1vuj@localhost>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox