summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane2007-11-16 03:23:07 +0000
committerTom Lane2007-11-16 03:23:07 +0000
commit3b869902e09ca6a1b25d5bb548cd5efb753767ef (patch)
treefaad01b39ccff6209b3e0299aa3fc068e7e15d71
parentb291e175a418d516010cad316d300131b980cebe (diff)
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).
-rw-r--r--doc/src/sgml/gin.sgml15
-rw-r--r--doc/src/sgml/textsearch.sgml7
2 files changed, 20 insertions, 2 deletions
diff --git a/doc/src/sgml/gin.sgml b/doc/src/sgml/gin.sgml
index d438db20a0..e0a9cb2c98 100644
--- a/doc/src/sgml/gin.sgml
+++ b/doc/src/sgml/gin.sgml
@@ -162,6 +162,17 @@
</varlistentry>
<varlistentry>
+ <term><xref linkend="guc-maintenance-work-mem"></term>
+ <listitem>
+ <para>
+ Build time for a <acronym>GIN</acronym> index is very sensitive to
+ the <varname>maintenance_work_mem</> setting; it doesn't pay to
+ skimp on work memory during index creation.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
<term><xref linkend="guc-gin-fuzzy-search-limit"></term>
<listitem>
<para>
@@ -177,8 +188,8 @@
</para>
<para>
To facilitate controlled execution of such queries
- <acronym>GIN</acronym> has a configurable soft upper limit on the size
- of the returned set, the
+ <acronym>GIN</acronym> has a configurable soft upper limit on the
+ number of rows returned, the
<varname>gin_fuzzy_search_limit</varname> configuration parameter.
It is set to 0 (meaning no limit) by default.
If a non-zero limit is set, then the returned set is a subset of
diff --git a/doc/src/sgml/textsearch.sgml b/doc/src/sgml/textsearch.sgml
index 982d62a564..e54543e1c9 100644
--- a/doc/src/sgml/textsearch.sgml
+++ b/doc/src/sgml/textsearch.sgml
@@ -3257,6 +3257,13 @@ EXPLAIN SELECT * FROM apod WHERE textsearch @@ to_tsquery('supernovae');
</para>
<para>
+ Note that <acronym>GIN</acronym> index build time can often be improved
+ by increasing <xref linkend="guc-maintenance-work-mem">, while
+ <acronym>GiST</acronym> index build time is not sensitive to that
+ parameter.
+ </para>
+
+ <para>
Partitioning of big collections and the proper use of GiST and GIN indexes
allows the implementation of very fast searches with online update.
Partitioning can be done at the database level using table inheritance