mirror of
https://github.com/postgres/postgres.git
synced 2025-07-30 11:03:19 +03:00
Add TIMING option to EXPLAIN, to allow eliminating of timing overhead.
Sometimes it may be useful to get actual row counts out of EXPLAIN (ANALYZE) without paying the cost of timing every node entry/exit. With this patch, you can say EXPLAIN (ANALYZE, TIMING OFF) to get that. Tomas Vondra, reviewed by Eric Theise, with minor doc changes by me.
This commit is contained in:
@ -40,6 +40,7 @@ EXPLAIN [ ANALYZE ] [ VERBOSE ] <replaceable class="parameter">statement</replac
|
||||
VERBOSE [ <replaceable class="parameter">boolean</replaceable> ]
|
||||
COSTS [ <replaceable class="parameter">boolean</replaceable> ]
|
||||
BUFFERS [ <replaceable class="parameter">boolean</replaceable> ]
|
||||
TIMING [ <replaceable class="parameter">boolean</replaceable> ]
|
||||
FORMAT { TEXT | XML | JSON | YAML }
|
||||
</synopsis>
|
||||
</refsynopsisdiv>
|
||||
@ -171,6 +172,21 @@ ROLLBACK;
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><literal>TIMING</literal></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Include the actual startup time and time spent in the node in the output.
|
||||
The overhead of repeatedly reading the system clock can slow down the
|
||||
query significantly on some systems, so it may be useful to set this
|
||||
parameter to <literal>FALSE</literal> when only actual row counts, and not
|
||||
exact times, are needed.
|
||||
This parameter may only be used when <literal>ANALYZE</literal> is also
|
||||
enabled. It defaults to <literal>TRUE</literal>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><literal>FORMAT</literal></term>
|
||||
<listitem>
|
||||
|
Reference in New Issue
Block a user