Quoting Tom Lane <tgl@xxxxxxxxxxxxx>: > Mischa Sandberg <mischa.sandberg@xxxxxxxxx> writes: > > The PG hash join is the simplest possible: build a hash table in > memory, and match an input stream against it. > > [ raised eyebrow... ] Apparently you've not read the code. It's > been hybrid hashjoin since we got it from Berkeley. Probably not the > best possible implementation of the concept, but we do > understand about spill to disk. Apologies. I stopped reading around line 750 (PG 8.0.1) in src/backend/executor/nodeHashjoin.c if (!node->hj_hashdone) { .... /* * execute the Hash node, to build the hash table */ hashNode->hashtable = hashtable; (void) ExecProcNode((PlanState *) hashNode); ... and missed the comment: /* * Open temp files for outer batches, */ Will quietly go and read twice, talk once. ---------------------------(end of broadcast)--------------------------- TIP 4: Don't 'kill -9' the postmaster