hash function in Postgres

From: Ravi Kiran <ravi(dot)kolanpaka(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: hash function in Postgres
Date: 2015-01-24 06:42:06
Message-ID: CAOh57xG8DHUMkrJa-BRtkcOKJKX=RXGsAqnO97vy7xikEH8K-A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

hi,

I want to know what kind of hash function postgresql uses while joining. I
was debugging through gdb, I found out that it is not using bob jenkins
hash function but a different hash function *hash_uint32() and
hash_any() *functions
if the joining attribute is an integer, and a different kind of hash
function for a different type of joining attribute.

I want to know whether the hash functions will change if the number of
tuples in the table are very large or very low, and if it changes, please
tell me what hash function it uses if the tuples are very large and what
hash function it uses if the number is very low, also I came to know that
the hash function will change depending on the type of the attribute on
which the join takes place, but will it always remains the same for the
integer type of joining attribute or will it it change.

thanks

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Keith Fiske 2015-01-24 07:53:13 Re: 9.3.5 failing to compile with dtrace on FreeBSD 10.1
Previous Message David G Johnston 2015-01-24 01:18:47 Re: CLOG read problem after pg_basebackup