Re: [PATCH] Include triggers in EXPLAIN

Поиск
Список
Период
Сортировка
От Josef Šimánek
Тема Re: [PATCH] Include triggers in EXPLAIN
Дата
Msg-id CAFp7QwrJqG4oF5-9H-=8J9PkGwGnHV70xLi19jLMExA97qVfnA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [PATCH] Include triggers in EXPLAIN  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [PATCH] Include triggers in EXPLAIN
Список pgsql-hackers
Hello Tom.

Thanks for quick response. As I was testing this feature it shows all "possible" triggers to be executed running given query. The benefit of having this information in EXPLAIN as well is you do not need to execute the query (as EXPLAIN ANALYZE does). My usecase is to take a look at query before it is executed to get some idea about the plan with EXPLAIN.

Do you have idea about some case where actual trigger will be missing in EXPLAIN with current implementation, but will be present in EXPLAIN ANALYZE? I can take a look if there's any way how to handle those cases as well.

ne 3. 11. 2019 v 22:49 odesílatel Tom Lane <tgl@sss.pgh.pa.us> napsal:
Josef Šimánek <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 по дате отправления:

Предыдущее
От: Kuntal Ghosh
Дата:
Сообщение: Re: PATCH: logical_work_mem and logical streaming of largein-progress transactions
Следующее
От: Dilip Kumar
Дата:
Сообщение: Re: PATCH: logical_work_mem and logical streaming of largein-progress transactions