type of index? - Mailing list pgsql-general

From Neil Conway
Subject type of index?
Date
Msg-id 20001204212903.C1186@klamath.dyndns.org
Whole thread Raw
Responses Re: type of index?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
I'm wondering about the types of indexes available. I have an indexed
column in a table which will ONLY be used with the '=' operator - in
other words:

SELECT foo FROM bar WHERE this_col = 1234;

Should the index on this_col be a btree or a hash index? By default, it
seems like Postgres is creating a btree index. But according to the
PgSQL docs, a hash index could also be used. Which would result in
better performance? Also, I've read in the list archives that
btree indexes are much better, in general, than the others. Given this,
which index is the best? Is there some of rule of thumb I can use
to decide for this and other cases?

Thanks in advance,

Neil

--
Neil Conway <neilconway@home.com>
Get my GnuPG key from: http://klamath.dyndns.org/mykey.asc
Encrypted mail welcomed

In every country and every age, the priest has been hostile to liberty.
He is always in alliance with the despot ... they have perverted the
purest religion ever preached to man into mystery and jargon,
unintelligible to all mankind, and therfore the safer engine for
their purpose.
        -- Thomas Jefferson

pgsql-general by date:

Previous
From: "rob"
Date:
Subject: Re: Re: Why PostgreSQL is not that popular as MySQL?
Next
From: Tim Kientzle
Date:
Subject: Re: Why PostgreSQL is not that popular as MySQL?