Re: Deleting millions of rows

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Feb 2, 2009 at 3:37 PM, Brian Cox <brian.cox@xxxxxx> wrote:
> David Wilson [david.t.wilson@xxxxxxxxx] 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@xxxxxxxxx

-- 
Sent via pgsql-performance mailing list (pgsql-performance@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance

[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux