aboutsummaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2002-06-21 03:25:53 +0000
committerBruce Momjian <bruce@momjian.us>2002-06-21 03:25:53 +0000
commitebe4375fa1d875ff51dbc127f3317d281b21589d (patch)
treece1a086dc544499c9bb81c0cb66e71104ac97a4d /doc/src
parentdb650b451ed4dcacc1022d9bfbcc36ca383257f1 (diff)
downloadpostgresql-ebe4375fa1d875ff51dbc127f3317d281b21589d.tar.gz
postgresql-ebe4375fa1d875ff51dbc127f3317d281b21589d.zip
Document problems with hash indexes compared to btree.
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/indices.sgml11
-rw-r--r--doc/src/sgml/ref/create_index.sgml7
-rw-r--r--doc/src/sgml/xindex.sgml8
3 files changed, 14 insertions, 12 deletions
diff --git a/doc/src/sgml/indices.sgml b/doc/src/sgml/indices.sgml
index 417a50dcb35..6317e4ea749 100644
--- a/doc/src/sgml/indices.sgml
+++ b/doc/src/sgml/indices.sgml
@@ -1,4 +1,4 @@
-<!-- $Header: /cvsroot/pgsql/doc/src/sgml/indices.sgml,v 1.31 2002/01/07 02:29:12 petere Exp $ -->
+<!-- $Header: /cvsroot/pgsql/doc/src/sgml/indices.sgml,v 1.32 2002/06/21 03:25:53 momjian Exp $ -->
<chapter id="indexes">
<title id="indexes-title">Indexes</title>
@@ -181,12 +181,9 @@ CREATE INDEX <replaceable>name</replaceable> ON <replaceable>table</replaceable>
</synopsis>
<note>
<para>
- Because of the limited utility of hash indexes, a B-tree index
- should generally be preferred over a hash index. We do not have
- sufficient evidence that hash indexes are actually faster than
- B-trees even for <literal>=</literal> comparisons. Moreover,
- hash indexes require coarser locks; see <xref
- linkend="locking-indexes">.
+ Testing has shown that hash indexes are slower than btree indexes,
+ and the size and build time for hash indexes is much worse. For
+ these reasons, hash index use is discouraged.
</para>
</note>
</para>
diff --git a/doc/src/sgml/ref/create_index.sgml b/doc/src/sgml/ref/create_index.sgml
index a3af001006a..6bb972e988e 100644
--- a/doc/src/sgml/ref/create_index.sgml
+++ b/doc/src/sgml/ref/create_index.sgml
@@ -1,5 +1,5 @@
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_index.sgml,v 1.31 2002/05/18 15:44:47 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_index.sgml,v 1.32 2002/06/21 03:25:53 momjian Exp $
PostgreSQL documentation
-->
@@ -329,6 +329,11 @@ ERROR: Cannot create index: 'index_name' already exists.
an indexed attribute is involved in a comparison using
the <literal>=</literal> operator.
</para>
+ <para>
+ Testing has shown that hash indexes are slower than btree indexes,
+ and the size and build time for hash indexes is much worse. For
+ these reasons, hash index use is discouraged.
+ </para>
<para>
Currently, only the B-tree and gist access methods support multicolumn
diff --git a/doc/src/sgml/xindex.sgml b/doc/src/sgml/xindex.sgml
index c6bfb0e19f3..99f069a6748 100644
--- a/doc/src/sgml/xindex.sgml
+++ b/doc/src/sgml/xindex.sgml
@@ -1,5 +1,5 @@
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/xindex.sgml,v 1.25 2002/05/29 17:36:40 tgl Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/xindex.sgml,v 1.26 2002/06/21 03:25:53 momjian Exp $
PostgreSQL documentation
-->
@@ -11,9 +11,9 @@ PostgreSQL documentation
<para>
The procedures described thus far let you define new types, new
- functions, and new operators. However, we cannot yet define a secondary
- index (such as a B-tree, R-tree, or
- hash access method) over a new type or its operators.
+ functions, and new operators. However, we cannot yet define a
+ secondary index (such as a B-tree, R-tree, or hash access method)
+ over a new type or its operators.
</para>
<para>