Re: Best way to delete big amount of records from big table

Laurenz Albe <laurenz.albe@cybertec.at>

From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Ekaterina Amez <ekaterina.amez@zunibal.com>
Cc: postgres performance list <pgsql-performance@postgresql.org>
Date: 2020-03-28T04:32:57Z
Lists: 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