summaryrefslogtreecommitdiff
path: root/src/include/executor/nodeHash.h
diff options
context:
space:
mode:
authorTom Lane2005-03-06 22:15:05 +0000
committerTom Lane2005-03-06 22:15:05 +0000
commit00659aa29dcb4906a818869fe08cb4e240d2e717 (patch)
tree8f83ac2a0ba82ee4436469c1079cac9855f562ec /src/include/executor/nodeHash.h
parentf716d4f6a24b352112127aa9342ccd3f6bb9dba1 (diff)
Revise hash join code so that we can increase the number of batches
on-the-fly, and thereby avoid blowing out memory when the planner has underestimated the hash table size. Hash join will now obey the work_mem limit with some faithfulness. Per my recent proposal (hash aggregate part isn't done yet though).
Diffstat (limited to 'src/include/executor/nodeHash.h')
-rw-r--r--src/include/executor/nodeHash.h24
1 files changed, 13 insertions, 11 deletions
diff --git a/src/include/executor/nodeHash.h b/src/include/executor/nodeHash.h
index ba289849d8..bdda454fdc 100644
--- a/src/include/executor/nodeHash.h
+++ b/src/include/executor/nodeHash.h
@@ -25,18 +25,20 @@ extern void ExecReScanHash(HashState *node, ExprContext *exprCtxt);
extern HashJoinTable ExecHashTableCreate(Hash *node, List *hashOperators);
extern void ExecHashTableDestroy(HashJoinTable hashtable);
extern void ExecHashTableInsert(HashJoinTable hashtable,
- ExprContext *econtext,
- List *hashkeys);
-extern int ExecHashGetBucket(HashJoinTable hashtable,
- ExprContext *econtext,
- List *hashkeys);
-extern int ExecHashGetBatch(int bucketno, HashJoinTable hashtable);
-extern HeapTuple ExecScanHashBucket(HashJoinState *hjstate, List *hjclauses,
- ExprContext *econtext);
-extern void ExecHashTableReset(HashJoinTable hashtable, long ntuples);
+ HeapTuple tuple,
+ uint32 hashvalue);
+extern uint32 ExecHashGetHashValue(HashJoinTable hashtable,
+ ExprContext *econtext,
+ List *hashkeys);
+extern void ExecHashGetBucketAndBatch(HashJoinTable hashtable,
+ uint32 hashvalue,
+ int *bucketno,
+ int *batchno);
+extern HeapTuple ExecScanHashBucket(HashJoinState *hjstate,
+ ExprContext *econtext);
+extern void ExecHashTableReset(HashJoinTable hashtable);
extern void ExecChooseHashTableSize(double ntuples, int tupwidth,
- int *virtualbuckets,
- int *physicalbuckets,
+ int *numbuckets,
int *numbatches);
#endif /* NODEHASH_H */