Re: new hash function

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Neil Conway <nconway(at)klamath(dot)dyndns(dot)org>
Cc: PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: new hash function
Date: 2002-03-06 20:49:37
Message-ID: 200203062049.g26Knba08577@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches


Patch applied. Thanks.

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

Neil Conway wrote:
> I've attached a patch which implements Bob Jenkin's hash function for
> PostgreSQL. This hash function replaces the one used by hash indexes and
> the catalog cache. Hash joins use a different, relatively poor-quality
> hash function, but I'll fix that later.
>
> As suggested by Tom Lane, this patch also changes the size of the fixed
> hash table used by the catalog cache to be a power-of-2 (instead of a
> prime: I chose 256 instead of 257). This allows the catcache to lookup
> hash buckets using a simple bitmask. This should improve the performance
> of the catalog cache slightly, since the previous method (modulo a
> prime) was slow.
>
> In my tests, this improves the performance of hash indexes by between 4%
> and 8%; the performance when using btree indexes or seqscans is
> basically unchanged.
>
> Unless anyone seems a problem, please apply.
>
> Cheers,
>
> Neil
>
> --
> Neil Conway <neilconway(at)rogers(dot)com>
> PGP Key ID: DB3C29FC

[ Attachment, skipping... ]

>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org

--
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-hackers by date

  From Date Subject
Next Message Bruce Momjian 2002-03-06 21:16:52 Re: Combining chars in psql (pre-patch)
Previous Message Tom Lane 2002-03-06 20:28:08 Re: Planned cleanups in attribute parsing

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2002-03-07 04:44:48 Re: date formatting and tab-complete patch
Previous Message Bruce Momjian 2002-03-06 20:48:44 Re: missing patch