Quoting Tom Lane <[EMAIL PROTECTED]>:

> Mischa Sandberg <[EMAIL PROTECTED]> 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 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Reply via email to