Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: HASH-JOIN

Re: HASH-JOIN

From: <tdrudy_at_ix.netcom.com>
Date: 1997/01/23
Message-ID: <32E805E2.44B5@ix.netcom.com>#1/1

Bard wrote:
>
> I occasionally see "HASH JOIN" in explain plans, but my brain hasn't yet
> comprehended what's occuring. I'm sure I'm likely being dense. I
> understand hash clusters (though I'm not using any), but I'm lost when
> Oracle says it's doing a HASH JOIN. I make extensive use of explain plans
> to assist ad hoc users with performance, and I'd really like to understand
> what's happening here. Could anyone please help?
>
> Thanks!
>
> --brad
> ==============================================================
> = Bradley W. Skiles bwskiles_at_adpc.purdue.edu =
> = Purdue University 317-494-0481 (o) =
> = Freehafer Hall 317-428-3957 (p) =
> = West Lafayette, IN 47907-1061 =
> = Kellogg's Meteoric Theory of Data: "Data doesn't move; =
> = it lands and sticks. =
> ==============================================================

If I remember correctly: the first pass builds a hash table for relation A on values of the join attribute, say, A.1. The second pass then scans the second relation B and applies the same hashing function to join attribute B.1. When B.1 hits A.1 and a corresponding check reveals that A.1 equals B.1, the joined rows are generated. It's faster than a merge since nothing need be sorted.

                        Tom Received on Thu Jan 23 1997 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US