Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Okay- I give up - what on earth is a "hash" ?
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 DatabasesReceived on Thu Mar 21 2002 - 14:20:47 CST
![]() |
![]() |