Skip to content

Commit fb8b38e

Browse files
committed
Add a couple of notes pointing out that GIN index build time is very
sensitive to maintenance_work_mem (something I just learned the hard way).
1 parent f639df0 commit fb8b38e

File tree

2 files changed

+22
-4
lines changed

2 files changed

+22
-4
lines changed

doc/src/sgml/gin.sgml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/gin.sgml,v 2.12 2007/11/13 23:36:26 tgl Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/gin.sgml,v 2.13 2007/11/16 03:23:07 tgl Exp $ -->
22

33
<chapter id="GIN">
44
<title>GIN Indexes</title>
@@ -161,6 +161,17 @@
161161
</listitem>
162162
</varlistentry>
163163

164+
<varlistentry>
165+
<term><xref linkend="guc-maintenance-work-mem"></term>
166+
<listitem>
167+
<para>
168+
Build time for a <acronym>GIN</acronym> index is very sensitive to
169+
the <varname>maintenance_work_mem</> setting; it doesn't pay to
170+
skimp on work memory during index creation.
171+
</para>
172+
</listitem>
173+
</varlistentry>
174+
164175
<varlistentry>
165176
<term><xref linkend="guc-gin-fuzzy-search-limit"></term>
166177
<listitem>
@@ -177,8 +188,8 @@
177188
</para>
178189
<para>
179190
To facilitate controlled execution of such queries
180-
<acronym>GIN</acronym> has a configurable soft upper limit on the size
181-
of the returned set, the
191+
<acronym>GIN</acronym> has a configurable soft upper limit on the
192+
number of rows returned, the
182193
<varname>gin_fuzzy_search_limit</varname> configuration parameter.
183194
It is set to 0 (meaning no limit) by default.
184195
If a non-zero limit is set, then the returned set is a subset of

doc/src/sgml/textsearch.sgml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/textsearch.sgml,v 1.35 2007/11/14 23:48:55 tgl Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/textsearch.sgml,v 1.36 2007/11/16 03:23:07 tgl Exp $ -->
22

33
<chapter id="textsearch">
44
<title id="textsearch-title">Full Text Search</title>
@@ -3256,6 +3256,13 @@ EXPLAIN SELECT * FROM apod WHERE textsearch @@ to_tsquery('supernovae');
32563256
lexemes better but are slower to update.
32573257
</para>
32583258

3259+
<para>
3260+
Note that <acronym>GIN</acronym> index build time can often be improved
3261+
by increasing <xref linkend="guc-maintenance-work-mem">, while
3262+
<acronym>GiST</acronym> index build time is not sensitive to that
3263+
parameter.
3264+
</para>
3265+
32593266
<para>
32603267
Partitioning of big collections and the proper use of GiST and GIN indexes
32613268
allows the implementation of very fast searches with online update.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy