Re: btree index and max()

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: efinley(at)efinley(dot)com
Cc: leonbloy(at)sinectis(dot)com(dot)ar, pgsql-general(at)postgresql(dot)org
Subject: Re: btree index and max()
Date: 2000-10-02 04:32:12
Message-ID: 200010020432.AAA17819@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> >By the way, I didn't find many comments about the pros and
> >cons of btree/hash indexes in the docs, nor in Bruce's book...
>
> If I remember my data-structures (from way back when) correctly then:
>
> hash indexes are only good for very fast single row lookups.
>
> isam indexes are good for range lookups, but the implementations that
> I've seen of isam indexes doesn't allow for dynamic index expanding.
>
> btree is good for both. btree won't be quite as fast as a hash for a
> single row lookup, but still very fast. btree won't (if I remember
> correctly) be quite as fast as an isam for a range lookup, but still
> very fast. Also, btree allows for dynamic index expansion.

Sorry to be replying to late.

First, I did not mention btree vs. hash in my book because we have not
seen any empirical evidence that hash is faster than btree in
PostgreSQL. Also, I wanted simplicity, so I did not get into the issue.

As far as ISAM, yes, I do miss its absense. The best we have now is
btree combined with the CLUSTER command. Since ISAM is not
self-optimizing, having to run CLUSTER on a btree is similar to having
to recreate the ISAM every so often. Not sure what gain we would get by
having a native ISAM vs our current btree/CLUSTER capability.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Paul T Trowbridge 2000-10-02 04:43:46 compiling error with cygnus gcc under win95
Previous Message Dale Walker 2000-10-01 21:45:46 Comments