Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitebe4375

Browse files
committed
Document problems with hash indexes compared to btree.
1 parentdb650b4 commitebe4375

File tree

3 files changed

+14
-12
lines changed

3 files changed

+14
-12
lines changed

‎doc/src/sgml/indices.sgml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/indices.sgml,v 1.31 2002/01/07 02:29:12 petere Exp $ -->
1+
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/indices.sgml,v 1.32 2002/06/21 03:25:53 momjian Exp $ -->
22

33
<chapter id="indexes">
44
<title id="indexes-title">Indexes</title>
@@ -181,12 +181,9 @@ CREATE INDEX <replaceable>name</replaceable> ON <replaceable>table</replaceable>
181181
</synopsis>
182182
<note>
183183
<para>
184-
Because of the limited utility of hash indexes, a B-tree index
185-
should generally be preferred over a hash index. We do not have
186-
sufficient evidence that hash indexes are actually faster than
187-
B-trees even for <literal>=</literal> comparisons. Moreover,
188-
hash indexes require coarser locks; see <xref
189-
linkend="locking-indexes">.
184+
Testing has shown that hash indexes are slower than btree indexes,
185+
and the size and build time for hash indexes is much worse. For
186+
these reasons, hash index use is discouraged.
190187
</para>
191188
</note>
192189
</para>

‎doc/src/sgml/ref/create_index.sgml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_index.sgml,v 1.31 2002/05/18 15:44:47 petere Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_index.sgml,v 1.32 2002/06/21 03:25:53 momjian Exp $
33
PostgreSQL documentation
44
-->
55

@@ -329,6 +329,11 @@ ERROR: Cannot create index: 'index_name' already exists.
329329
an indexed attribute is involved in a comparison using
330330
the <literal>=</literal> operator.
331331
</para>
332+
<para>
333+
Testing has shown that hash indexes are slower than btree indexes,
334+
and the size and build time for hash indexes is much worse. For
335+
these reasons, hash index use is discouraged.
336+
</para>
332337

333338
<para>
334339
Currently, only the B-tree and gist access methods support multicolumn

‎doc/src/sgml/xindex.sgml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/xindex.sgml,v 1.25 2002/05/29 17:36:40 tgl Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/xindex.sgml,v 1.26 2002/06/21 03:25:53 momjian Exp $
33
PostgreSQL documentation
44
-->
55

@@ -11,9 +11,9 @@ PostgreSQL documentation
1111

1212
<para>
1313
The procedures described thus far let you define new types, new
14-
functions, and new operators.However, we cannot yet define a secondary
15-
index (such as a B-tree, R-tree, or
16-
hash access method)over a new type or its operators.
14+
functions, and new operators. However, we cannot yet define a
15+
secondaryindex (such as a B-tree, R-tree, or hash access method)
16+
over a new type or its operators.
1717
</para>
1818

1919
<para>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp