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.
-------------------------------
When Oracle is searching for a buffer, the hash value is created based on a combination of the block's file number and block number, which is known as the data block address (DBA). So the hash function essentially hashes on the buffer's file number and block number. It is a very convenient situation and allows for a very quick hash.
Hash value inputs are hashed to buckets. Every output value represents a single bucket. For example, because the modulus 10 hash function shown in Figure 6-6 can produce ten possible output values, there will be ten hash buckets. If the input value were 9, then it would be hashed to bucket number nine. It's that simple.
In many hashing situations, the number of possible hash value inputs exceeds the number of buckets. The examples I just gave are just like this, since there are only 10 buckets, yet there are 1,000 hash input values. In regard to Oracle, the number of possible hash value inputs is the number of Oracle database blocks. But at any one time, the number of hash value input values will equal the number of buffers in the buffer cache.
©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.
|