Re: [HACKERS] hybrid hash, cont. of development suggestion needed - Mailing list pgsql-hackers

From Xun Cheng
Subject Re: [HACKERS] hybrid hash, cont. of development suggestion needed
Date
Msg-id 200001162344.PAA01190@hercules.cs.ucsb.edu
Whole thread Raw
In response to Re: [HACKERS] [hackers]development suggestion needed  (Hannu Krosing <hannu@tm.ee>)
Responses Re: [HACKERS] hybrid hash, cont. of development suggestion needed
List pgsql-hackers
First I want to thank you for all help I got to my
earlier posting.


>> Right.  The hash join uses batching if it estimates that the relation
>> is too large to fit in memory; is that what you call "hybrid"?
>
>I've heard the word "hybrid" being used of a scheme where you hash each 
>key of a multi-key index separately and then concatenate the hashes for 
>the index. That way you can use the index for accessing also subsets of 
>keys by examining only the buxkets with matching hash sections.

In research, there are traditionally three kinds of hash joins:
simple hash, grace hash and hybrid hash. Hybrid is generally considered
to be having a better performance since it is designed to combine
the best behavior of simple hash and grace hash.
It has two phases. In the first the relations are read, hashed into
buckets, and written out, as in grace hash. However, during this phase
a portion of the memory is reserved for an in-memory hash bucket for R (
R is joining with S and R is smaller). This bucket of R will never
be written to disk.

xun



pgsql-hackers by date:

Previous
From: Alfred Perlstein
Date:
Subject: docs done Re: [HACKERS] LIBPQ patches ...
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] hybrid hash, cont. of development suggestion needed