Re: [PERFORM] "Hash index" vs. "b-tree index" (PostgreSQL

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Neil Conway <neilc(at)samurai(dot)com>
Cc: Mischa Sandberg <mischa(dot)sandberg(at)telus(dot)net>, pgsql-general(at)postgresql(dot)org
Subject: Re: [PERFORM] "Hash index" vs. "b-tree index" (PostgreSQL
Date: 2005-05-27 22:07:38
Message-ID: 200505272207.j4RM7cP26096@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-performance


Added to TODO:

* Consider sorting hash buckets so entries can be found using a binary
search, rather than a linear scan
* In hash indexes, consider storing the hash value with or instead
of the key itself

---------------------------------------------------------------------------

Neil Conway wrote:
> Bruce Momjian wrote:
> > Is there a TODO anywhere in this discussion? If so, please let me know.
>
> There are a couple:
>
> - consider changing hash indexes to keep the entries in a hash bucket
> sorted, to allow a binary search rather than a linear scan
>
> - consider changing hash indexes to store each key's hash value in
> addition to or instead of the key value.
>
> You should probably include a pointer to this discussion as well.
>
> (I'd like to take a look at implementing these if I get a chance.)
>
> -Neil
>

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Mohan, Ross 2005-05-27 22:22:41 Fast request for version checking....
Previous Message David Parker 2005-05-27 20:37:15 Re: another failover testing question

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2005-05-28 00:09:44 Re: Redundant indexes?
Previous Message Jeffrey Tenny 2005-05-27 21:28:01 Redundant indexes?