From: Bendik Rognlien Johansen <bendik.johansen@gmail.com>
To: pgsql-performance@postgresql.org
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Subject: Re: How to speed up delete
Date: Thu, 7 Jul 2005 17:03:36 +0200
Message-ID: <F6FA99FB-A195-4BB8-A868-D4B249572EF4@gmail.com> (raw)
In-Reply-To: <7517.1120744945@sss.pgh.pa.us>
References: <6F239216-7936-4E62-B708-46DC9171649C@gmail.com>
<7517.1120744945@sss.pgh.pa.us>
Thanks!
That took care of it.
On Jul 7, 2005, at 4:02 PM, Tom Lane wrote:
> 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
>
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-performance@postgresql.org
Cc: bendik.johansen@gmail.com, tgl@sss.pgh.pa.us
Subject: Re: How to speed up delete
In-Reply-To: <F6FA99FB-A195-4BB8-A868-D4B249572EF4@gmail.com>
References: <6F239216-7936-4E62-B708-46DC9171649C@gmail.com> <7517.1120744945@sss.pgh.pa.us> <F6FA99FB-A195-4BB8-A868-D4B249572EF4@gmail.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