Skip site navigation (1) Skip section navigation (2)

pgsql: Change hash indexes to store only the hash code rather than the

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Change hash indexes to store only the hash code rather than the
Date: 2008-09-15 18:43:41
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-committers
Log Message:
Change hash indexes to store only the hash code rather than the whole indexed
value.  This means that hash index lookups are always lossy and have to be
rechecked when the heap is visited; however, the gain in index compactness
outweighs this when the indexed values are wide.  Also, we only need to
perform datatype comparisons when the hash codes match exactly, rather than
for every entry in the hash bucket; so it could also win for datatypes that
have expensive comparison functions.  A small additional win is gained by
keeping hash index pages sorted by hash code and using binary search to reduce
the number of index tuples we have to look at.

Xiao Meng

This commit also incorporates Zdenek Kotala's patch to isolate hash metapages
and hash bitmaps a bit better from the page header datastructures.

Modified Files:
        catalogs.sgml (r2.173 -> r2.174)
        hash.c (r1.104 -> r1.105)
        hashinsert.c (r1.50 -> r1.51)
        hashovfl.c (r1.64 -> r1.65)
        hashpage.c (r1.76 -> r1.77)
        hashsearch.c (r1.53 -> r1.54)
        hashutil.c (r1.56 -> r1.57)
        index.c (r1.303 -> r1.304)
        tuplesort.c (r1.86 -> r1.87)
        hash.h (r1.89 -> r1.90)
        catversion.h (r1.485 -> r1.486)
        pg_am.h (r1.57 -> r1.58)
        pg_opclass.h (r1.82 -> r1.83)

pgsql-committers by date

Next:From: Magnus HaganderDate: 2008-09-15 20:55:04
Subject: pgsql: Fix error messages from recent pg_hba parsing patch to use
Previous:From: User KostasDate: 2008-09-15 13:49:11
Subject: pgtreelib - pgtreelib: set_root

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group