pg.ddx.io pgsql-docs@postgresql.org mailing list archivehelp / color / mirror / Atom feed
ModifyTable, EXPLAIN ANALYZE and AFTER triggers 2+ messages / 2 participants [nested] [flat]
* ModifyTable, EXPLAIN ANALYZE and AFTER triggers @ 2011-03-02 11:05 Marko Tiikkaja <marko.tiikkaja@cs.helsinki.fi> 2011-03-02 15:29 ` Re: ModifyTable, EXPLAIN ANALYZE and AFTER triggers Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 1 reply; 2+ messages in thread From: Marko Tiikkaja @ 2011-03-02 11:05 UTC (permalink / raw) To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-docs Hi, The recent commit 09b49a8439fde63826f93f55430868cf2585644b claims: + Time spent firing triggers, if any, is charged to the Insert, + Update, or Delete node, and is also shown separately for each trigger. + Note, however, that deferred triggers will not be fired until end of + transaction and are thus not accounted for in the output of + <command>EXPLAIN ANALYZE</command>. But that's only part of the truth; the ModifyTable nodes queue AFTER triggers, but don't actually fire them. I remember there was some discussion during 9.0's development about making the ModifyTable nodes also count the time spent firing AFTER triggers, but I don't remember what we decided back then. Meanwhile, I think this part in the documentation needs a small clarification. Regards, Marko Tiikkaja ^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: ModifyTable, EXPLAIN ANALYZE and AFTER triggers 2011-03-02 11:05 ModifyTable, EXPLAIN ANALYZE and AFTER triggers Marko Tiikkaja <marko.tiikkaja@cs.helsinki.fi> @ 2011-03-02 15:29 ` Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 2+ messages in thread From: Tom Lane @ 2011-03-02 15:29 UTC (permalink / raw) To: Marko Tiikkaja <marko.tiikkaja@cs.helsinki.fi>; +Cc: pgsql-docs Marko Tiikkaja <marko.tiikkaja@cs.helsinki.fi> writes: > The recent commit 09b49a8439fde63826f93f55430868cf2585644b claims: > + Time spent firing triggers, if any, is charged to the Insert, > + Update, or Delete node, and is also shown separately for each trigger. > + Note, however, that deferred triggers will not be fired until end of > + transaction and are thus not accounted for in the output of > + <command>EXPLAIN ANALYZE</command>. > But that's only part of the truth; the ModifyTable nodes queue AFTER > triggers, but don't actually fire them. I remember there was some > discussion during 9.0's development about making the ModifyTable nodes > also count the time spent firing AFTER triggers, but I don't remember > what we decided back then. Meanwhile, I think this part in the > documentation needs a small clarification. Oh, you're right --- I was thinking that the fireASTriggers call would actually execute the triggers, but of course it only queues them. Will fix. regards, tom lane ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2011-03-02 15:29 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2011-03-02 11:05 ModifyTable, EXPLAIN ANALYZE and AFTER triggers Marko Tiikkaja <marko.tiikkaja@cs.helsinki.fi> 2011-03-02 15:29 ` Tom Lane <tgl@sss.pgh.pa.us>
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