what are two types of hash files??how it differ?

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
dlkkrao
Participant
Posts: 37
Joined: Wed Apr 20, 2005 4:26 am
Location: mumbai-india
Contact:

what are two types of hash files??how it differ?

Post by dlkkrao »

Hi,
.Let me know ,what are two types of hash files??how it differ?


thanks.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

This sounds far too much like an interview question to go into detail answering!

DSXchange has a powerful search facility which would have pointed you to Ken Bland's tech tip on hashed files or this post amongst hundreds of other hashed file related posts.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

There are many more than two types of hashed file.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
rameshrr3
Premium Member
Premium Member
Posts: 609
Joined: Mon May 10, 2004 3:32 am
Location: BRENTWOOD, TN

Post by rameshrr3 »

Types 2 through 18 are static hashed files
each based on the hashing algorithm / nature of key column data

Type 30 Dynamic hashed file, where system decides whats best.

And you have non hashed files

Type 1,Type 19 (engine native files)
Type 25(Balanced Tree)
Type 27( Distributed or partitioned?? :? )

Type 25 is made available in the hashed file stage icon .

Thats my 2 cents for this one.


When is the interview :?: :wink:
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

A couple of things need to be modified in the previous comment:
rameshrr3 wrote:Types 2 through 18 are static hashed files
each based on the hashing algorithm / nature of key column data
While true, the important aspect of static hashed files is not the algorithm used to turn the key into a number (the hashing method) but the number of buckets, or modulo, that is specified when defining the file. This remains static, unlike the type 30 defined below. Thus a file can take up hundreds of megabytes on disk yet have no records, or can have a modulo of 1 with millions of records and take minutes or hours to read just 1 row.
rameshrr3 wrote:Type 30 Dynamic hashed file, where system decides whats best.
Type 30 uses either a sequential numeric or general type of hashing algorithm, defaulting to general and will dynamically increase or decrease the modulo of the file depending upon it's size and use of space.
rameshrr3 wrote:Type 27( Distributed or partitioned?? :? )
No type 27. Distributed and Partitioned files use quite different mechanisms to define their access and/or actual paths. The part files are datastage hashed files themselves.
rameshrr3 wrote:Type 25 is made available in the hashed file stage icon .
Type 25 is a hashed file; it is a balanced B-Tree file.
rameshrr3 wrote:Type 1,Type 19 (engine native files)
No, types 1 and 19 are not native files, they are directories. Type 1 is for older OSs which have a limitation on the length of path components. I think it uses 16 characters but am no longer certain. So writing "This_Is_A_Long_Record_Name" would actually get written to a subdirectory path called "This_Is_A_Long_R/ecord_Name". Type 19 is for long path names.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Lock tables are hashed files (in memory). As I said, there's lots of kinds of hashed files. But I will not elaborate further, as it doesn't help anyone.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply