OSDN Git Service

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)
commit596efd27edce20bba706f50de99a0f15bcc2a567
tree63c07c3c310e1b072f0a29a79220c81254dba3d8
parent249d936bed069877923f0369bd2ce51a6f8f925e
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