Re: WIP: make EXPLAIN ANALYZE show time spent in triggers

Поиск
Список
Период
Сортировка
От Christopher Kings-Lynne
Тема Re: WIP: make EXPLAIN ANALYZE show time spent in triggers
Дата
Msg-id 4243B453.6080801@familyhealth.com.au
обсуждение исходный текст
Ответ на WIP: make EXPLAIN ANALYZE show time spent in triggers  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: WIP: make EXPLAIN ANALYZE show time spent in triggers
Список pgsql-patches
> The attached patch allows EXPLAIN ANALYZE to break out the time spent in
> triggers when EXPLAINing a statement that can fire triggers.  Formerly
> this time was included in "Total runtime" but not otherwise accounted
> for.

Very nice.

> An example is
>
> regression=# explain analyze delete from foo;
>                                                QUERY PLAN
> --------------------------------------------------------------------------------------------------------
>  Seq Scan on foo  (cost=0.00..172.70 rows=11770 width=6) (actual time=0.063..86.650 rows=10000 loops=1)
>  Trigger RI_ConstraintTrigger_60781: time=3899.609 calls=10000
>  Total runtime: 4218.309 ms
> (3 rows)

Could we get plain EXPLAIN output as well:

regression=# explain analyze delete from foo;
                                                QUERY PLAN

--------------------------------------------------------------------------------------------------------
  Seq Scan on foo  (cost=0.00..172.70 rows=11770 width=6)
  Trigger RI_ConstraintTrigger_60781: calls=11770
(2 rows)

Also, have you considered statement level triggers?

Chris

В списке pgsql-patches по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: WIP: make EXPLAIN ANALYZE show time spent in triggers
Следующее
От: Tom Lane
Дата:
Сообщение: Re: WIP: make EXPLAIN ANALYZE show time spent in triggers