From 596efd27edce20bba706f50de99a0f15bcc2a567 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sat, 21 Mar 2009 00:04:40 +0000 Subject: 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/nodes/outfuncs.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/backend/nodes/outfuncs.c') diff --git a/src/backend/nodes/outfuncs.c b/src/backend/nodes/outfuncs.c index d64f0ad0426..212fc0673c2 100644 --- a/src/backend/nodes/outfuncs.c +++ b/src/backend/nodes/outfuncs.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/nodes/outfuncs.c,v 1.354 2009/03/10 22:09:25 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/nodes/outfuncs.c,v 1.355 2009/03/21 00:04:39 tgl Exp $ * * NOTES * Every node type that can appear in stored rules' parsetrees *must* @@ -675,6 +675,11 @@ _outHash(StringInfo str, Hash *node) WRITE_NODE_TYPE("HASH"); _outPlanInfo(str, (Plan *) node); + + WRITE_OID_FIELD(skewTable); + WRITE_INT_FIELD(skewColumn); + WRITE_OID_FIELD(skewColType); + WRITE_INT_FIELD(skewColTypmod); } static void -- cgit v1.2.3