pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Mischa Sandberg <mischa.sandberg@telus.net>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Jim C. Nasby <decibel@decibel.org>
Cc: Neil Conway <neilc@samurai.com>
Cc: Christopher Petrilli <petrilli@gmail.com>
Cc: Ying Lu <ying_lu@cs.concordia.ca>
Cc: pgsql-general@postgresql.org
Cc: pgsql-performance@postgresql.org
Subject: Re: [PERFORM] "Hash index" vs. "b-tree index" (PostgreSQL
Date: Tue, 10 May 2005 16:24:01 -0700
Message-ID: <1115767441.4281429124b9b@webmail.telus.net> (raw)
In-Reply-To: <27799.1115765781@sss.pgh.pa.us>
References: <427F6853.90308@cs.concordia.ca>
	<427F757A.8000407@samurai.com>
	<59d991c405050908271b55e673@mail.gmail.com>
	<427F8321.5030702@samurai.com>
	<20050509163423.GH35026@decibel.org>
	<427F9211.2090008@samurai.com>
	<20050509165133.GJ35026@decibel.org>
	<427FFCD3.1010803@samurai.com>
	<20050510153245.GA31103@decibel.org>
	<1115760957.4281293e0155b@webmail.telus.net>
	<27799.1115765781@sss.pgh.pa.us>

Quoting Tom Lane <tgl@sss.pgh.pa.us>:

> Mischa Sandberg <mischa.sandberg@telus.net> 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. 




view thread (36+ messages)  latest in thread

Message-ID: <1115767441.4281429124b9b@webmail.telus.net>
Permalink:  ../1115767441.4281429124b9b@webmail.telus.net/
Also on:    postgresql.org/message-id/1115767441.4281429124b9b@webmail.telus.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: mischa.sandberg@telus.net, tgl@sss.pgh.pa.us, decibel@decibel.org, neilc@samurai.com, petrilli@gmail.com, ying_lu@cs.concordia.ca, pgsql-general@postgresql.org
  Subject: Re: [PERFORM] "Hash index" vs. "b-tree index" (PostgreSQL
  In-Reply-To: <1115767441.4281429124b9b@webmail.telus.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox