You were brought to this page based on an internet search
and as a free service to Oracle DBAs.
The text below is an except from the book,
Oracle Performance Firefighting, written by
Craig Shallahamer of
OraPub, Inc.
Figures and tables are not included on this page, only their reference.
To order the book in either print or PDF form, click
here.
©2009, 2010 by Craig Shallahamer. This is copyrighted material.
PleaseOut of respect for those involved in the creation of the book and also for
their familes, we ask you to respect the copyright both in intent and deed. Thank you.
-------------------------------
Figure 6-6. A hashing function maps the hash value input to a defined range. Part a shows the general hashing algorithm structure; part b shows a classic hashing algorithm. Regardless of the positive integer input, the output will always be between 0 and 9.
A good hash function will yield evenly dispersed outputs. For example, regardless of the hash value, any output is just as likely to occur as any other output. More specifically, if the output range is between 0 and 9, looking at actual outputs, there are just as many 0 values as 1, 2, 3 ... 9 values. Figure 6-7 shows a histogram depicting this near-perfect result.
Figure 6-7. When given random numbers as hash value inputs, even a simple modulus hash function will provide an even distribution of outputs.
©2009, 2010 by Craig Shallahamer. This is copyrighted material.
PleaseOut of respect for those involved in the creation of the book and also for
their familes, we ask you to respect the copyright both in intent and deed. Thank you.
|