aboutsummaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2005-03-25 21:58:00 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2005-03-25 21:58:00 +0000
commitadb1a6e95b2087e44c845edc15c28a87f5ba7ac1 (patch)
tree262134a0f4ec11fe71f1963d4531b71f2534aea3 /doc/src
parent08890b407e976e4871f2024ed5a3071d0fa510a6 (diff)
downloadpostgresql-adb1a6e95b2087e44c845edc15c28a87f5ba7ac1.tar.gz
postgresql-adb1a6e95b2087e44c845edc15c28a87f5ba7ac1.zip
Improve EXPLAIN ANALYZE to show the time spent in each trigger when
executing a statement that fires triggers. Formerly this time was included in "Total runtime" but not otherwise accounted for. As a side benefit, we avoid re-opening relations when firing non-deferred AFTER triggers, because the trigger code can re-use the main executor's ResultRelInfo data structure.
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/perform.sgml25
1 files changed, 14 insertions, 11 deletions
diff --git a/doc/src/sgml/perform.sgml b/doc/src/sgml/perform.sgml
index 2316df99a5c..ff93eaf8315 100644
--- a/doc/src/sgml/perform.sgml
+++ b/doc/src/sgml/perform.sgml
@@ -1,5 +1,5 @@
<!--
-$PostgreSQL: pgsql/doc/src/sgml/perform.sgml,v 1.50 2005/02/03 07:12:37 neilc Exp $
+$PostgreSQL: pgsql/doc/src/sgml/perform.sgml,v 1.51 2005/03/25 21:57:57 tgl Exp $
-->
<chapter id="performance-tips">
@@ -320,16 +320,19 @@ EXPLAIN ANALYZE SELECT * FROM tenk1 t1, tenk2 t2 WHERE t1.unique1 &lt; 50 AND t1
</para>
<para>
- The <literal>Total runtime</literal> shown by <command>EXPLAIN ANALYZE</command> includes
- executor start-up and shut-down time, as well as time spent processing
- the result rows. It does not include parsing, rewriting, or planning
- time. For a <command>SELECT</> query, the total run time will normally be just a
- little larger than the total time reported for the top-level plan node.
- For <command>INSERT</>, <command>UPDATE</>, and <command>DELETE</> commands, the total run time may be
- considerably larger, because it includes the time spent processing the
- result rows. In these commands, the time for the top plan node
- essentially is the time spent computing the new rows and/or locating
- the old ones, but it doesn't include the time spent making the changes.
+ The <literal>Total runtime</literal> shown by <command>EXPLAIN
+ ANALYZE</command> includes executor start-up and shut-down time, as well
+ as time spent processing the result rows. It does not include parsing,
+ rewriting, or planning time. For a <command>SELECT</> query, the total
+ run time will normally be just a little larger than the total time
+ reported for the top-level plan node. For <command>INSERT</>,
+ <command>UPDATE</>, and <command>DELETE</> commands, the total run time
+ may be considerably larger, because it includes the time spent processing
+ the result rows. In these commands, the time for the top plan node
+ essentially is the time spent computing the new rows and/or locating the
+ old ones, but it doesn't include the time spent making the changes.
+ Time spent firing triggers, if any, is also outside the top plan node,
+ and is shown separately for each trigger.
</para>
<para>