From: Tom Lane <tgl@sss.pgh.pa.us>
To: Les <nagylzs@gmail.com>
Cc: pgsql-performance@lists.postgresql.org
Subject: Re: slow delete
Date: Tue, 15 Aug 2023 16:37:39 -0400
Message-ID: <1174734.1692131859@sss.pgh.pa.us> (raw)
In-Reply-To: <CAKXe9UBE8wmTJnxrSqjVv+TTJqtPOv1TZn96TAvrxo5er6ZTvw@mail.gmail.com>
References: <CAKXe9UBE8wmTJnxrSqjVv+TTJqtPOv1TZn96TAvrxo5er6ZTvw@mail.gmail.com>
Les <nagylzs@gmail.com> writes:
> It seems that two foreign key constraints use 10.395 seconds out of the
> total 11.24 seconds. But I don't see why it takes that much?
Probably because you don't have an index on the referencing column.
You can get away with that, if you don't care about the speed of
deletes from the PK table ...
regards, tom lane
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: tgl@sss.pgh.pa.us, nagylzs@gmail.com, pgsql-performance@lists.postgresql.org
Subject: Re: slow delete
In-Reply-To: <1174734.1692131859@sss.pgh.pa.us>
* 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