From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Ekaterina Amez <ekaterina.amez@zunibal.com>
Cc: postgres performance list <pgsql-performance@postgresql.org>
Subject: Re: Best way to delete big amount of records from big table
Date: Sat, 28 Mar 2020 05:32:57 +0100
Message-ID: <ec48ca143f128cbd2b8202338c3122f3c01078b6.camel@cybertec.at> (raw)
In-Reply-To: <CAFijohjCdcu7w0Oi2ppEc5_mbR3WisQ6kvRyF=3SwntAGr3Qcw@mail.gmail.com>
References: <6e456b07-a396-f9e3-6a22-23a96b73420c@zunibal.com>
<5e44d4e8ae73193efa82fb2744dbd95cc5130669.camel@cybertec.at>
<CAFijohjCdcu7w0Oi2ppEc5_mbR3WisQ6kvRyF=3SwntAGr3Qcw@mail.gmail.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: laurenz.albe@cybertec.at, ekaterina.amez@zunibal.com
Subject: Re: Best way to delete big amount of records from big table
In-Reply-To: <ec48ca143f128cbd2b8202338c3122f3c01078b6.camel@cybertec.at>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox