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

Home -> Community -> Usenet -> c.d.o.server -> Re: Hash join VS sort-merge, nested loops...

Re: Hash join VS sort-merge, nested loops...

From: Yong <yhuang_at_indigopool.com>
Date: 2000/08/01
Message-ID: <8m7cv5$53$1@news.sinet.slb.com>#1/1

I don't have formal training in computer science. Why does building a hash table require sorting? Let's say I have a number 24 and the hash table size is 8. Assuming the simplest hash function using modulus: 24 % 8 = 0. So 24 goes to the first bucket. By the same function, 12345 goes into the second bucket (12345 % 8 = 1). No sorting.

Yong Huang
yhuang_at_indigopool.com

<eshevtsov_at_my-deja.com> wrote in message news:8m4mi4$e5k$1_at_nnrp1.deja.com...
> In article <8m47f4$dj7$1_at_news.sinet.slb.com>,
> "Yong" <yhuang_at_indigopool.com> wrote:
> > I agree. Here's what Harrison says on page 161:
> >
> > and [a hash join] should outperform sort merge joins for large tables
 when
> > one table is much larger than the other
> > ...
> > The hash join requires no sorting...
> >
>
> Do you want to say that a process of the hash table building (I mean
> the smallest of two rows set) doesn't require sorting? Is it true?
>
> Edward
>
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Received on Tue Aug 01 2000 - 00:00:00 CDT

Original text of this message

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