new hash function

Поиск
Список
Период
Сортировка
От Neil Conway
Тема new hash function
Дата
Msg-id 1015295769.9599.191.camel@jiro
обсуждение исходный текст
Ответы Re: new hash function  (Bruce Momjian <pgman@candle.pha.pa.us>)
Re: new hash function  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-patches
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@rogers.com>
PGP Key ID: DB3C29FC

Вложения

В списке pgsql-patches по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: simple code cleanups
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Showing index details with \d on psql