@@ -80,86 +80,93 @@ LOAD 'auto_explain';
80
80
When this parameter is on, per-plan-node timing occurs for all
81
81
statements executed, whether or not they run long enough to actually
82
82
get logged. This can have an extremely negative impact on performance.
83
+ Turning off <varname>auto_explain.log_timing</varname> ameliorates the
84
+ performance cost, at the price of obtaining less information.
83
85
</para>
84
86
</note>
85
87
</listitem>
86
88
</varlistentry>
87
89
88
90
<varlistentry>
89
91
<term>
90
- <varname>auto_explain.log_verbose </varname> (<type>boolean</type>)
92
+ <varname>auto_explain.log_buffers </varname> (<type>boolean</type>)
91
93
</term>
92
94
<indexterm>
93
- <primary><varname>auto_explain.log_verbose </> configuration parameter</primary>
95
+ <primary><varname>auto_explain.log_buffers </> configuration parameter</primary>
94
96
</indexterm>
95
97
<listitem>
96
98
<para>
97
- <varname>auto_explain.log_verbose</varname> causes <command>EXPLAIN VERBOSE</>
98
- output, rather than just <command>EXPLAIN</> output, to be printed
99
- when an execution plan is logged. This parameter is off by default.
99
+ <varname>auto_explain.log_buffers</varname> controls whether buffer
100
+ usage statistics are printed when an execution plan is logged; it's
101
+ equivalent to the <literal>BUFFERS</> option of <command>EXPLAIN</>.
102
+ This parameter has no effect
103
+ unless <varname>auto_explain.log_analyze</varname> is enabled.
104
+ This parameter is off by default.
100
105
Only superusers can change this setting.
101
106
</para>
102
107
</listitem>
103
108
</varlistentry>
104
109
105
110
<varlistentry>
106
111
<term>
107
- <varname>auto_explain.log_buffers </varname> (<type>boolean</type>)
112
+ <varname>auto_explain.log_timing </varname> (<type>boolean</type>)
108
113
</term>
109
114
<indexterm>
110
- <primary><varname>auto_explain.log_buffers </> configuration parameter</primary>
115
+ <primary><varname>auto_explain.log_timing </> configuration parameter</primary>
111
116
</indexterm>
112
117
<listitem>
113
118
<para>
114
- <varname>auto_explain.log_buffers</varname> causes <command>EXPLAIN
115
- (ANALYZE, BUFFERS)</> output, rather than just <command>EXPLAIN</>
116
- output, to be printed when an execution plan is logged. This parameter is
117
- off by default. Only superusers can change this setting. This
118
- parameter has no effect unless <varname>auto_explain.log_analyze</>
119
- parameter is set.
119
+ <varname>auto_explain.log_timing</varname> controls whether per-node
120
+ timing information is printed when an execution plan is logged; it's
121
+ equivalent to the <literal>TIMING</> option of <command>EXPLAIN</>.
122
+ The overhead of repeatedly reading the system clock can slow down
123
+ queries significantly on some systems, so it may be useful to set this
124
+ parameter to off when only actual row counts, and not exact times, are
125
+ needed.
126
+ This parameter has no effect
127
+ unless <varname>auto_explain.log_analyze</varname> is enabled.
128
+ This parameter is on by default.
129
+ Only superusers can change this setting.
120
130
</para>
121
131
</listitem>
122
132
</varlistentry>
123
133
124
134
<varlistentry>
125
135
<term>
126
- <varname>auto_explain.log_format </varname> (<type>enum </type>)
136
+ <varname>auto_explain.log_verbose </varname> (<type>boolean </type>)
127
137
</term>
128
138
<indexterm>
129
- <primary><varname>auto_explain.log_format </> configuration parameter</primary>
139
+ <primary><varname>auto_explain.log_verbose </> configuration parameter</primary>
130
140
</indexterm>
131
141
<listitem>
132
142
<para>
133
- <varname>auto_explain.log_format </varname> selects the
134
- <command>EXPLAIN</> output format to be used.
135
- The allowed values are <literal>text</literal>, <literal>xml</literal>,
136
- <literal>json</literal>, and <literal>yaml</literal>. The default is text .
143
+ <varname>auto_explain.log_verbose </varname> controls whether verbose
144
+ details are printed when an execution plan is logged; it's
145
+ equivalent to the <literal>VERBOSE</> option of <command>EXPLAIN</>.
146
+ This parameter is off by default.
137
147
Only superusers can change this setting.
138
148
</para>
139
149
</listitem>
140
150
</varlistentry>
141
151
142
152
<varlistentry>
143
153
<term>
144
- <varname>auto_explain.log_timing </varname> (<type>boolean </type>)
154
+ <varname>auto_explain.log_format </varname> (<type>enum </type>)
145
155
</term>
146
156
<indexterm>
147
- <primary><varname>auto_explain.log_timing </> configuration parameter</primary>
157
+ <primary><varname>auto_explain.log_format </> configuration parameter</primary>
148
158
</indexterm>
149
159
<listitem>
150
160
<para>
151
- <varname>auto_explain.log_timing</varname> causes <command>EXPLAIN
152
- (ANALYZE, TIMING off)</> output, rather than just <command>EXPLAIN (ANALYZE)</>
153
- output. The overhead of repeatedly reading the system clock can slow down the
154
- query significantly on some systems, so it may be useful to set this
155
- parameter to <literal>FALSE</literal> when only actual row counts, and not
156
- exact times, are needed.
157
- This parameter is only effective when <varname>auto_explain.log_analyze</varname>
158
- is also enabled. It defaults to <literal>TRUE</literal>.
161
+ <varname>auto_explain.log_format</varname> selects the
162
+ <command>EXPLAIN</> output format to be used.
163
+ The allowed values are <literal>text</literal>, <literal>xml</literal>,
164
+ <literal>json</literal>, and <literal>yaml</literal>. The default is text.
165
+ Only superusers can change this setting.
159
166
</para>
160
167
</listitem>
161
168
</varlistentry>
162
-
169
+
163
170
<varlistentry>
164
171
<term>
165
172
<varname>auto_explain.log_nested_statements</varname> (<type>boolean</type>)
@@ -179,7 +186,9 @@ LOAD 'auto_explain';
179
186
</variablelist>
180
187
181
188
<para>
182
- These parameters must be set in <filename>postgresql.conf</>.
189
+ In ordinary usage, these parameters are set
190
+ in <filename>postgresql.conf</>, although superusers can alter them
191
+ on-the-fly within their own sessions.
183
192
Typical usage might be:
184
193
</para>
185
194
@@ -197,6 +206,7 @@ auto_explain.log_min_duration = '3s'
197
206
<programlisting>
198
207
postgres=# LOAD 'auto_explain';
199
208
postgres=# SET auto_explain.log_min_duration = 0;
209
+ postgres=# SET auto_explain.log_analyze = true;
200
210
postgres=# SELECT count(*)
201
211
FROM pg_class, pg_index
202
212
WHERE oid = indrelid AND indisunique;
0 commit comments