Xun Cheng <xun@cs.ucsb.edu> writes:
> 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.
Yes, that's how nodeHash.c does it...
regards, tom lane