10. Choosing Storage Structures and Secondary Indexes : Hash Storage Structure : When to Use Hash
 
Share this page                  
When to Use Hash
Hash is the fastest structure to use when you specify an exact match of the whole key value. Hash does not efficiently support pattern matching, range searches, or partial key specification with multi-column keys. For these queries the entire table must be scanned.
Hash is a good storage structure to use if you always retrieve the rows based on a known key value, such as order number or employee number.
Hash is a poor storage structure to use in any of these cases:
You use pattern matching.
You retrieve ranges of values.
You specify part of a multi-column key.