Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Hash join VS sort-merge, nested loops...
Yong wrote:
>
> 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.
There is a paper on metalink about hash joins and the methodology used... I'd recommend having a read of that.
HTH
-- =========================================== Connor McDonald http://www.oracledba.co.uk We are born naked, wet and hungry...then things get worseReceived on Wed Aug 02 2000 - 00:00:00 CDT