diff options
| author | Tom Lane | 2009-03-21 00:04:40 +0000 |
|---|---|---|
| committer | Tom Lane | 2009-03-21 00:04:40 +0000 |
| commit | 93094a17be1e01fa969aa721b14d806d98157efe (patch) | |
| tree | e1c14a4ca43d1839c605aa8d3cdd13e3de9068df /src/include/executor/nodeHash.h | |
| parent | c958a3694909edc6a96834af809dbff235b8c0c9 (diff) | |
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.
Diffstat (limited to 'src/include/executor/nodeHash.h')
| -rw-r--r-- | src/include/executor/nodeHash.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/include/executor/nodeHash.h b/src/include/executor/nodeHash.h index c2633308ec..7df9f187f1 100644 --- a/src/include/executor/nodeHash.h +++ b/src/include/executor/nodeHash.h @@ -41,8 +41,10 @@ extern void ExecHashGetBucketAndBatch(HashJoinTable hashtable, extern HashJoinTuple ExecScanHashBucket(HashJoinState *hjstate, ExprContext *econtext); extern void ExecHashTableReset(HashJoinTable hashtable); -extern void ExecChooseHashTableSize(double ntuples, int tupwidth, +extern void ExecChooseHashTableSize(double ntuples, int tupwidth, bool useskew, int *numbuckets, - int *numbatches); + int *numbatches, + int *num_skew_mcvs); +extern int ExecHashGetSkewBucket(HashJoinTable hashtable, uint32 hashvalue); #endif /* NODEHASH_H */ |
