---
title: "Here’s Hash Index Real Purpose in DB2"
description: "We all know that, in DB2, there are different data access methods present. Either by using index are scanning methods. Hash index is a new technique in DB2 V10 .   The concept is not new this is alrea..."
url: https://srinimf.com/2014/12/05/db2-hash-index-functionality/
date: 2014-12-05
modified: 2026-10-10
author: "Srini"
categories: ["DB2"]
tags: ["Db2 Tips", "DB2 Tips and Solutions"]
type: post
lang: en
---

# Here’s Hash Index Real Purpose in DB2

We all know that, in DB2, there are different data access methods present. Either by using index are scanning methods.** Hash index is a new technique in [DB2 V10](https://srinimf.com/2013/05/01/db2-v10-new-access-methodhashing-2-of-2/)**.   The concept is not new this is already being used in Teradata RDBMS and an IMS database.

Related[DB2 for Beginners: What to Know Read Right Away](https://srinimf.com/2019/09/22/frequently-used-top-db2-words/)

## [What is](https://srinimf.com/2016/03/30/how-hash-access-is-faster-than-index-access-in-db2/) the Hash index?

When creating a Table defined with the Hash index, the values in the columns of the Hash index will pass through the hashing algorithm.

Then hashing algorithm will assign a single integer for each value in the hash indexed column. This single integer acts as an index, and data will be stored in a designated storage location. The below figure describes how the hash index works.

![](https://i0.wp.com/srinimf.com/wp-content/uploads/2014/12/68a68-hash2.jpg?resize=469%2C345)

Create table statement-ORGANIZE BY HASH UNIQUE (column-names) HASH SPACE (hash-space-value). This tells DB2 to use a Hash index technique for organizing data of a table.

Unique-Tells that no two values should be the same in hash indexed columns

Hash space-The The amount of fixed hash space pre-allocated for the table.

Keep Reading

### Share this:

-
- [Tweet](https://twitter.com/share)
- [![](https://i0.wp.com/assets.pinterest.com/images/pidgets/pinit_fg_en_rect_gray_20.png)](https://www.pinterest.com/pin/create/link/?url=https%3A%2F%2Fsrinimf.com%2F2014%2F12%2F05%2Fdb2-hash-index-functionality%2F&media=http%3A%2F%2Fsrinimf.com%2Fwp-content%2Fuploads%2F2014%2F12%2F68a68-hash2.jpg&description=Here%27s%20Hash%20Index%20Real%20Purpose%20in%20DB2)
-
- [Share on Tumblr](https://www.tumblr.com/share)
- [Share on WhatsApp (Opens in new window) WhatsApp](https://srinimf.com/2014/12/05/db2-hash-index-functionality/?share=jetpack-whatsapp)
- [More](#)
-

- [Print (Opens in new window) Print](https://srinimf.com/2014/12/05/db2-hash-index-functionality/?share=print)
- [Share on Reddit (Opens in new window) Reddit](https://srinimf.com/2014/12/05/db2-hash-index-functionality/?share=reddit)
- [Share on Telegram (Opens in new window) Telegram](https://srinimf.com/2014/12/05/db2-hash-index-functionality/?share=telegram)
- [Email a link to a friend (Opens in new window) Email](mailto:?subject=%5BShared%20Post%5D%20Here%27s%20Hash%20Index%20Real%20Purpose%20in%20DB2&body=https%3A%2F%2Fsrinimf.com%2F2014%2F12%2F05%2Fdb2-hash-index-functionality%2F&share=email)
-

### Like this:

Like Loading…
