---
title: "DB2 V10-New Access Method~Hashing (1 of 2)"
description: "The very basics about how hash access functionality works in DB2. This is simple and explained in better way. Read more."
url: https://srinimf.com/2013/04/12/db2-v10-new-access-method-hashing-1-of-2/
date: 2013-04-12
modified: 2026-10-10
author: "Srini"
image: https://i0.wp.com/srinimf.com/wp-content/uploads/2013/04/hash-index1.png?fit=600%2C377&ssl=1
categories: ["DB2"]
tags: ["DB2 Hashing Mechanism", "DB2 Tips and Solutions"]
type: post
lang: en
---

# DB2 V10-New Access Method~Hashing (1 of 2)

Up to Db2 V10, data in the db2 can be accessed by either Indexing or Scanning. The new method is called Hashing. Hashing-it is not New. It is old technology. IMS databases founded upon hashing.

![Hashing in DB2](https://i0.wp.com/images.books24x7.com/bookimages/id_47346/ch006_p338_fig006.3.jpg)*Hashing in DB2*

Hash function is an algorithm. It converts data elements into a single integer. This number serves an index to database.

## **[How to](https://srinimf.com/2015/11/16/benefits-of-vsam-verify-command/) create table with Hash function?**

```
CREATE TABLE DSN81010.DEPT
 (DEPTNO    CHAR(3) NOT NULL,
   DEPTNAME  VARCHAR(36) NOT NULL,
   MGRNO     CHAR(6),
   ADMRDEPT  CHAR(3) NOT NULL,
   LOCATION  CHAR(16),
   PRIMARY KEY (DEPTNO)
 )
   IN DSN8D10A.DSN8S10D
   ORGANIZE BY HASH UNIQUE (DEPTNO)
   HASH SPACE 64 M;
```

**Hash space:** It is defined area used for Hash access.

#### Related articles

- [Inserting into DB from data in Hash and Arrays](http://stackoverflow.com/questions/14926943/inserting-into-db-from-data-in-hash-and-arrays) (stackoverflow.com)
- [DB2 Connect-Interfacing with distributed systems](http://srinimf.com/2013/04/06/db2-connect-interfacing-with-distriuted-systems/) (srinimf.com)

### 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%2F2013%2F04%2F12%2Fdb2-v10-new-access-method-hashing-1-of-2%2F&media=https%3A%2F%2Fi0.wp.com%2Fsrinimf.com%2Fwp-content%2Fuploads%2F2013%2F04%2Fhash-index1.png%3Ffit%3D600%252C377%26ssl%3D1&description=DB2%20V10-New%20Access%20Method~Hashing%20%281%20of%202%29)
-
- [Share on Tumblr](https://www.tumblr.com/share)
- [Share on WhatsApp (Opens in new window) WhatsApp](https://srinimf.com/2013/04/12/db2-v10-new-access-method-hashing-1-of-2/?share=jetpack-whatsapp)
- [More](#)
-

- [Print (Opens in new window) Print](https://srinimf.com/2013/04/12/db2-v10-new-access-method-hashing-1-of-2/?share=print)
- [Share on Reddit (Opens in new window) Reddit](https://srinimf.com/2013/04/12/db2-v10-new-access-method-hashing-1-of-2/?share=reddit)
- [Share on Telegram (Opens in new window) Telegram](https://srinimf.com/2013/04/12/db2-v10-new-access-method-hashing-1-of-2/?share=telegram)
- [Email a link to a friend (Opens in new window) Email](mailto:?subject=%5BShared%20Post%5D%20DB2%20V10-New%20Access%20Method~Hashing%20%281%20of%202%29&body=https%3A%2F%2Fsrinimf.com%2F2013%2F04%2F12%2Fdb2-v10-new-access-method-hashing-1-of-2%2F&share=email)
-

### Like this:

Like Loading…
