Re: [PATCH] Include triggers in EXPLAIN - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [PATCH] Include triggers in EXPLAIN
Date
Msg-id 301.1572817776@sss.pgh.pa.us
Whole thread Raw
In response to [PATCH] Include triggers in EXPLAIN  (Josef Šimánek <josef.simanek@gmail.com>)
Responses Re: [PATCH] Include triggers in EXPLAIN  (Josef Šimánek <josef.simanek@gmail.com>)
List pgsql-hackers
=?UTF-8?B?Sm9zZWYgxaBpbcOhbmVr?= <josef.simanek@gmail.com> writes:
> Recently I got few times into situation where I was trying to find out what
> is blocking DELETE queries. Running EXPLAIN (even VERBOSE one) wasn't
> useful, since the reason was slow trigger (missing index on foreign key
> column). I had to create testing entry and run EXPLAIN ANALYZE DELETE to
> get this information.

> It will be really valuable for me to show triggers in EXPLAIN query since
> it will make clear for me there will be any trigger "activated" during
> execution of DELETE query and that can be the reason for slow DELETE.

I don't really see the point of this patch?  You do get the trigger
times during EXPLAIN ANALYZE, and I don't believe that a plain EXPLAIN
is going to have full information about what triggers might fire or
not fire.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Thomas Munro
Date:
Subject: Re: 64 bit transaction id
Next
From: Tom Lane
Date:
Subject: Re: BUG #16059: Tab-completion of filenames in COPY commands removes required quotes