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

"Hash index" vs. "b-tree index" (PostgreSQL 8.0)

From: Ying Lu <ying_lu(at)cs(dot)concordia(dot)ca>
To: pgsql-general(at)postgresql(dot)org
Cc: pgsql-performance(at)postgresql(dot)org
Subject: "Hash index" vs. "b-tree index" (PostgreSQL 8.0)
Date: 2005-05-09 13:40:35
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-generalpgsql-performance

We are working on speeding up the queries by creating indexes. We have 
queries with searching criteria such as "select ... where *col1='...'*". 
This is a simple query with only "=" operation. As a result I setup hash 
index on column "col1". While, in postgreSQL 8 doc, it is wirttern:

*Note: * Testing has shown PostgreSQL's hash indexes to perform no 
better than B-tree indexes, and the index size and build time for hash 
indexes is much worse. For these reasons, hash index use is presently 

May I know for simple "=" operation query, for "Hash index" vs. "B-tree" 
index, which can provide better performance please?



pgsql-performance by date

Next:From: Neil ConwayDate: 2005-05-09 14:36:42
Subject: Re: "Hash index" vs. "b-tree index" (PostgreSQL 8.0)
Previous:From: Harald FuchsDate: 2005-05-09 11:39:30
Subject: Re: Query tuning help

pgsql-general by date

Next:From: Tom LaneDate: 2005-05-09 13:47:14
Subject: Re: = or := ?
Previous:From: John D. BurgerDate: 2005-05-09 13:04:49
Subject: Re: Shorthand for foreign key indices

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