Re: Deleting millions of rows - Mailing list pgsql-performance

From David Wilson
Subject Re: Deleting millions of rows
Date
Msg-id e7f9235d0902021257s6d12d315kde27976578dee48d@mail.gmail.com
Whole thread Raw
In response to Re: Deleting millions of rows  (Brian Cox <brian.cox@ca.com>)
List pgsql-performance
On Mon, Feb 2, 2009 at 3:37 PM, Brian Cox <brian.cox@ca.com> wrote:
> David Wilson [david.t.wilson@gmail.com] wrote:
>
>> Is this table the target of any foreign keys?
>
> There are 2 "on delete cascade" FKs that reference this table.

I believe that's the source of your memory issues. I think TRUNCATE
may handle this more effectively; alternately you can handle the
cascading yourself in these cases. (And, as Dave Dutcher mentioned,
TRUNCATE is definitely the way to go for full-table wipes).


--
- David T. Wilson
david.t.wilson@gmail.com

pgsql-performance by date:

Previous
From: Brian Cox
Date:
Subject: Re: Deleting millions of rows
Next
From: Scott Marlowe
Date:
Subject: Re: Deleting millions of rows