Re: Best way to delete big amount of records from big table - Mailing list pgsql-performance

From Laurenz Albe
Subject Re: Best way to delete big amount of records from big table
Date
Msg-id ec48ca143f128cbd2b8202338c3122f3c01078b6.camel@cybertec.at
Whole thread Raw
In response to Re: Best way to delete big amount of records from big table  (Ekaterina Amez <ekaterina.amez@zunibal.com>)
List pgsql-performance
On Fri, 2020-03-27 at 16:15 +0100, Ekaterina Amez wrote:
> > You should define primary and foreign keys if you can, but I guess
> > I don't have to tell you that.
> 
> Excuse me if this is a silly question but I've read (or understood) that it's better
> to remove constraints to improve delete performance... this is related to indexes only? or also to PK-FK?

I meant, add constraints *after* you are done cleaning up.

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com




pgsql-performance by date:

Previous
From: daya airody
Date:
Subject: Re: JOIN on partitions is very slow
Next
From: Silvio Moioli
Date:
Subject: Increasing work_mem slows down query, why?