pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PFC <lists@peufeu.com>
To: Jessica Richard <rjessil@yahoo.com>
To: pgsql-performance@postgresql.org
Subject: Re: slow delete
Date: Fri, 04 Jul 2008 12:11:17 +0200
Message-ID: <op.udrik3eocigqcu@apollo13.peufeu.com> (raw)
In-Reply-To: <357892.18257.qm@web56412.mail.re3.yahoo.com>
References: <357892.18257.qm@web56412.mail.re3.yahoo.com>


> by the way, there is a foreign key on another table that references the  
> primary key col0 on table test.

	Is there an index on the referencing field in the other table ? Postgres  
must find the rows referencing the deleted rows, so if you forget to index  
the referencing column, this can take forever.



view thread (10+ messages)  latest in thread

Message-ID: <op.udrik3eocigqcu@apollo13.peufeu.com>
Permalink:  ../op.udrik3eocigqcu@apollo13.peufeu.com/
Also on:    postgresql.org/message-id/op.udrik3eocigqcu@apollo13.peufeu.com

 · 

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@peufeu.com, rjessil@yahoo.com
  Subject: Re: slow delete
  In-Reply-To: <op.udrik3eocigqcu@apollo13.peufeu.com>

* 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