Skip site navigation (1) Skip section navigation (2)

Re: Hash vs. HashJoin nodes

From: "Jim C(dot) Nasby" <decibel(at)decibel(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Neil Conway <neilc(at)samurai(dot)com>,pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Hash vs. HashJoin nodes
Date: 2005-04-01 00:32:40
Message-ID: 20050401003240.GU53309@decibel.org (view raw or flat)
Thread:
Lists: pgsql-hackers
On Thu, Mar 31, 2005 at 12:03:37AM -0500, Tom Lane wrote:
> > Right; I was planning to bail and only do this for inner joins.
> 
> Well, for outer joins the optimal strategy is simple: pull from the
> outer query first.  If it's empty then you needn't touch the inner
> query at all.  Otherwise you have to build the hash table.

What about the case of an empty inner query? Granted, you still have to
read in the outer query, but would there be any reason to generate
hashes for it's results?
-- 
Jim C. Nasby, Database Consultant               decibel(at)decibel(dot)org 
Give your computer some brain candy! www.distributed.net Team #1828

Windows: "Where do you want to go today?"
Linux: "Where do you want to go tomorrow?"
FreeBSD: "Are you guys coming, or what?"

In response to

pgsql-hackers by date

Next:From: Guy RouillierDate: 2005-04-01 00:54:31
Subject: Re: Debugging deadlocks
Previous:From: Greg Sabino MullaneDate: 2005-04-01 00:08:43
Subject: Re: HEAD \df doesn't show functions with no arguments

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group