From: Tom Lane <tgl@sss.pgh.pa.us>
To: Merlin Moncure <mmoncure@gmail.com>
Cc: Massalin Yerzhan <yerzhik@gmail.com>
Cc: postgres performance list <pgsql-performance@postgresql.org>
Subject: Re: Simple delete query is taking too long (never ends)
Date: Thu, 12 Nov 2015 10:36:35 -0500
Message-ID: <14810.1447342595@sss.pgh.pa.us> (raw)
In-Reply-To: <CAHyXU0wNYJQwW+m0vP_GaSmY6yh82WxB8+425TziJPVMAu-dVA@mail.gmail.com>
References: <CAMAXSpJyE4TN068xzDNXk-=7AJBnmZVrK8D2ZQz0eoP0vo30CQ@mail.gmail.com>
<17089.1447270415@sss.pgh.pa.us>
<CAHyXU0wNYJQwW+m0vP_GaSmY6yh82WxB8+425TziJPVMAu-dVA@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-performance>
Merlin Moncure <mmoncure@gmail.com> writes:
> On Wed, Nov 11, 2015 at 1:33 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> If you're not sure which table is the problem, try doing an EXPLAIN
>> ANALYZE of a DELETE that will only remove a few rows. You should
>> see some time blamed on a trigger associated with the FK constraint.
> You've answered this question (with the same answer) what feels like a
> gazillion times. I guess the underlying problem is that EXPLAIN is,
> uh, not explaining things very well.
In principle, a plain EXPLAIN could list the triggers that would
potentially be fired by the query, but I'm afraid that wouldn't help
much. The actual performance problem is down inside the trigger,
which is an opaque black box so far as EXPLAIN can possibly know.
regards, tom lane
--
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance
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, mmoncure@gmail.com, yerzhik@gmail.com
Subject: Re: Simple delete query is taking too long (never ends)
In-Reply-To: <14810.1447342595@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