Re: slow delete

From: Alan Hodgson <ahodgson(at)simkin(dot)ca>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: slow delete
Date: 2008-07-04 15:48:19
Message-ID: 200807040848.19462@hal.medialogik.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Friday 04 July 2008, tv(at)fuzzy(dot)cz wrote:
> > My next question is: what is the difference between "select" and
> > "delete"? There is another table that has one foreign key to reference
> > the test (parent) table that I am deleting from and this foreign key
> > does not have an index on it (a 330K row table).
>

Yeah you need to fix that. You're doing 80,000 sequential scans of that
table to do your delete. That's a whole lot of memory access ...

I don't let people here create foreign key relationships without matching
indexes - they always cause problems otherwise.

--
Alan

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Chris Browne 2008-07-04 16:58:48 Re: [QUESTION]Concurrent Access
Previous Message tv 2008-07-04 13:00:49 Re: slow delete