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: Okay- I give up - what on earth is a "hash" ?

Re: Okay- I give up - what on earth is a "hash" ?

From: Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>
Date: Thu, 21 Mar 2002 20:20:47 -0000
Message-ID: <1016741960.362.0.nnrp-14.9e984b29@news.demon.co.uk>

In the context of a hash join, the term 'hash table' is usually used to describe the thing you get when Oracle has scanned the first table to select the relevant rows and give each a hash value based on the join columns. The choice of hash function (or at least the number of output values that the function is allowed to produce) is dictated by the optimizer's estimate of the number of rows that will be acquired from the table, and is usually chosen to be significantly larger than the expected number of rows to improve the chance that each output value has only a single (or very small number of) row(s) associated with it. The value is also a power of 2.

>I ask because I'm reading that a hash join is often preferred if there is a
>join column with low cardinality and a large # of rows...it seems that a
>hash Table would be a table of each distinct value?

I would need to see more of the context to be sure of the point the author was trying to make here, but it looks as if they are describing a common characteristic of the table that is not hashed.

--
Jonathan Lewis
http://www.jlcomp.demon.co.uk

Next Seminar - UK, April 3rd - 5th
http://www.jlcomp.demon.co.uk/seminar.html

Host to The Co-Operative Oracle Users' FAQ
http://www.jlcomp.demon.co.uk/faq/ind_faq.html

Author of:
Practical Oracle 8i: Building Efficient Databases
Received on Thu Mar 21 2002 - 14:20:47 CST

Original text of this message

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