提交 09b49a84 编写于 作者: T Tom Lane

Update discussion of EXPLAIN to reflect existence of ModifyTable nodes.

Back-patch to 9.0, since this was changed then.
上级 97c4ee94
...@@ -430,18 +430,27 @@ WHERE t1.unique1 < 100 AND t1.unique2 = t2.unique2; ...@@ -430,18 +430,27 @@ WHERE t1.unique1 < 100 AND t1.unique2 = t2.unique2;
<para> <para>
The <literal>Total runtime</literal> shown by <command>EXPLAIN The <literal>Total runtime</literal> shown by <command>EXPLAIN
ANALYZE</command> includes executor start-up and shut-down time, as well ANALYZE</command> includes executor start-up and shut-down time, but not
as time spent processing the result rows. It does not include parsing, parsing, rewriting, or planning time. For <command>INSERT</>,
rewriting, or planning time. For a <command>SELECT</> query, the total <command>UPDATE</>, and <command>DELETE</> commands, the time spent
run time will normally be just a little larger than the total time applying the table changes is charged to a top-level Insert, Update,
reported for the top-level plan node. For <command>INSERT</>, or Delete plan node. (The plan nodes underneath this node represent
<command>UPDATE</>, and <command>DELETE</> commands, the total run time the work of locating the old rows and/or computing the new ones.)
might be considerably larger, because it includes the time spent processing Time spent firing triggers, if any, is charged to the Insert,
the result rows. For these commands, the time for the top plan node is Update, or Delete node, and is also shown separately for each trigger.
essentially the time spent locating the old rows and/or computing Note, however, that deferred triggers will not be fired until end of
the new ones, but it doesn't include the time spent applying the changes. transaction and are thus not accounted for in the output of
Time spent firing triggers, if any, is also outside the top plan node, <command>EXPLAIN ANALYZE</command>.
and is shown separately for each trigger. </para>
<para>
There are two significant ways in which runtimes measured by
<command>EXPLAIN ANALYZE</command> can deviate from normal execution of
the same query. First, since no output rows are delivered to the client,
network transmission costs and I/O formatting costs are not included.
Second, the overhead added by <command>EXPLAIN ANALYZE</command> can be
significant, especially on machines with slow <function>gettimeofday()</>
kernel calls.
</para> </para>
<para> <para>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册