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