You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/src/sgml/aqo.sgml
+99-75Lines changed: 99 additions & 75 deletions
Original file line number
Diff line number
Diff line change
@@ -52,12 +52,11 @@
52
52
<filename>postgresql.conf</filename> file:
53
53
</para>
54
54
<programlisting>
55
-
shared_preload_libraries = 'aqo.so'
55
+
shared_preload_libraries = 'aqo'
56
56
</programlisting>
57
57
<para>
58
-
You must preload the <filename>aqo.so</filename> library at the server startup,
59
-
since adaptive query optimization needs to be enabled per
60
-
database.
58
+
You should preload the `aqo` library at the server startup, since
59
+
adaptive query optimization needs to be enabled per database, not per connection. Otherwise, all the collected statistics will be lost when the session ends.
61
60
</para>
62
61
</listitem>
63
62
<listitem>
@@ -314,39 +313,44 @@ DELETE FROM aqo_data WHERE fspace_hash = (SELECT fspace_hash FROM aqo_queries
314
313
query planner, run:
315
314
</para>
316
315
<programlisting>
317
-
UPDATE aqo_queries SET use_aqo=false, learn_aqo=false, auto_tuning=false;s
316
+
UPDATE aqo_queries SET use_aqo=false, learn_aqo=false, auto_tuning=false;
318
317
</programlisting>
319
318
</sect3>
320
319
</sect2>
321
320
<sect2 id="aqo-reference">
322
321
<title>Reference</title>
323
322
<sect3 id="aqo-variables">
324
323
<title>Configuration Variables</title>
325
-
<para>The aqo extension provides the following configuration variables:
326
-
</para>
327
324
<sect4 id="aqo-mode">
328
325
<title>aqo.mode</title>
329
326
<para>Defines the <filename>aqo</filename> optimization modes.
330
327
</para>
331
-
<para><emphasis role="strong">Options:</emphasis>
332
-
</para>
333
-
<itemizedlist spacing="compact">
334
-
<listitem>
335
-
<para>
336
-
<literal>intelligent</literal> - auto-tunes your queries based on statistics collected per query type.
337
-
</para>
338
-
</listitem>
339
-
<listitem>
340
-
<para>
341
-
<literal>forced</literal> - optimizes all queries together, regardless of the query type.
342
-
</para>
343
-
</listitem>
344
-
<listitem>
345
-
<para>
346
-
<literal>manual</literal> (default) - uses the default planner for all new queries, but can reuse the collected statistics for already known query types, if any.
<entry>Auto-tunes your queries based on statistics collected per query type.</entry>
341
+
342
+
</row>
343
+
<row>
344
+
<entry><literal>forced</literal></entry>
345
+
<entry>Optimizes all queries together, regardless of the query type.</entry>
346
+
</row>
347
+
<row>
348
+
<entry><literal>manual</literal></entry>
349
+
<entry><emphasis role="strong">Default.</emphasis> Uses the default planner for all new queries, but can reuse the collected statistics for already known query types, if any.</entry>
350
+
</row>
351
+
</tbody>
352
+
</tgroup>
353
+
</table>
350
354
</sect4>
351
355
352
356
@@ -357,54 +361,67 @@ UPDATE aqo_queries SET use_aqo=false, learn_aqo=false, auto_tuning=false;s
357
361
<title>aqo_query_texts Table</title>
358
362
<para>
359
363
The <literal>aqo_query_texts</literal> table classifies all
360
-
the query types processed by <filename>aqo</filename>. This
361
-
table includes the following columns:
364
+
the query types processed by <filename>aqo</filename>.
362
365
</para>
363
-
<itemizedlist spacing="compact">
364
-
<listitem>
365
-
<para>
366
-
<literal>query_hash</literal> stores the hash value that
367
-
uniquely identifies the query type.
368
-
</para>
369
-
</listitem>
370
-
<listitem>
371
-
<para>
372
-
<literal>query_text</literal> provides a sample query of
0 commit comments