Optimize multi-batch hash joins when the outer relation has a nonuniform
authorTom Lane <tgl@sss.pgh.pa.us>
Sat, 21 Mar 2009 00:04:40 +0000 (00:04 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Sat, 21 Mar 2009 00:04:40 +0000 (00:04 +0000)
commit93094a17be1e01fa969aa721b14d806d98157efe
treee1c14a4ca43d1839c605aa8d3cdd13e3de9068df
parentc958a3694909edc6a96834af809dbff235b8c0c9
Optimize multi-batch hash joins when the outer relation has a nonuniform
distribution, by creating a special fast path for the (first few) most common
values of the outer relation.  Tuples having hashvalues matching the MCVs
are effectively forced to be in the first batch, so that we never write
them out to the batch temp files.

Bryce Cutt and Ramon Lawrence, with some editorialization by me.
src/backend/executor/nodeHash.c
src/backend/executor/nodeHashjoin.c
src/backend/nodes/copyfuncs.c
src/backend/nodes/outfuncs.c
src/backend/optimizer/path/costsize.c
src/backend/optimizer/plan/createplan.c
src/include/executor/hashjoin.h
src/include/executor/nodeHash.h
src/include/nodes/execnodes.h
src/include/nodes/plannodes.h