Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2af0971

Browse files
committed
Clarify documentation of EXPLAIN (TIMING OFF) option.
Clarify that this option doesn't suppress measurement of the statement'stotal runtime.Greg Smith
1 parentd4337a0 commit2af0971

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

‎doc/src/sgml/ref/explain.sgml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,11 +182,13 @@ ROLLBACK;
182182
<term><literal>TIMING</literal></term>
183183
<listitem>
184184
<para>
185-
Includetheactual startup time and time spent inthe node in the output.
185+
Include actual startup time and time spent ineach node in the output.
186186
The overhead of repeatedly reading the system clock can slow down the
187187
query significantly on some systems, so it may be useful to set this
188-
parameter to <literal>FALSE</literal> when only actual row counts, and not
189-
exact times, are needed.
188+
parameter to <literal>FALSE</literal> when only actual row counts, and
189+
not exact times, are needed. Run time of the entire statement is
190+
always measured, even when node-level timing is turned off with this
191+
option.
190192
This parameter may only be used when <literal>ANALYZE</literal> is also
191193
enabled. It defaults to <literal>TRUE</literal>.
192194
</para>

‎src/backend/commands/explain.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,10 @@ ExplainOnePlan(PlannedStmt *plannedstmt, IntoClause *into, ExplainState *es,
414414
if (es->buffers)
415415
instrument_option |=INSTRUMENT_BUFFERS;
416416

417+
/*
418+
* We always collect timing for the entire statement, even when
419+
* node-level timing is off, so we don't look at es->timing here.
420+
*/
417421
INSTR_TIME_SET_CURRENT(starttime);
418422

419423
/*

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp