If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Index Structure. Hash table

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-29-10, 08:53
ProXtremer ProXtremer is offline
Registered User
 
Join Date: May 2010
Posts: 3
Index Structure. Hash table

Hello everybody,

I have to make a documentation about Index Structure and Hash Tables in DB2 but I can't find any information about Hash tabels, so any help will be welcome. Does DB2 support such a structure.. I read only about B-trees.

Thank you! Greetings
Reply With Quote
  #2 (permalink)  
Old 05-29-10, 11:31
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
Quote:
Originally Posted by ProXtremer View Post
Hello everybody,

I have to make a documentation about Index Structure and Hash Tables in DB2 but I can't find any information about Hash tabels, so any help will be welcome. Does DB2 support such a structure.. I read only about B-trees.

Thank you! Greetings
ORGANIZE BY KEY SEQUENCE

DB2 has a feature called ORGANIZE BY KEY SEQUENCE that I believe uses hashing, since each possible key value in the defined range has a predetermined location in the physical table (and the space must be allocated ahead of time when the table is created). A unique index is defined in the catalog using the ORGANIZE BY KEY SEQUENCE columns, but an actual index object is not created in storage, because the table organization is ordered by this key, so it uses a hash formula to find the location of the data in the table. Obviously, there can only be one Key Sequence per table (although it could contain more than one column). Very few people use this feature, and I don't know much about it.

Oracle has hash indexes, but I have never met an Oracle DBA who has used one. Nor have I met a DB2 who has used ORGANIZE BY KEY SEQUENCE. I think these are included so marketing people can tell prospective DBMS buyers that they have it, especially those who don't know much about DBMS's and purchase products based on how many features they contain.

DPF

In addition, DB2 uses hashing in Database Partitioning Feature (DPF) to determine which partition the row will be stored in. The partitioning key must be included as one or more columns of the Primary Key.
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On