Hash File Options

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
narasimha
Charter Member
Charter Member
Posts: 1236
Joined: Fri Oct 22, 2004 8:59 am
Location: Staten Island, NY

Hash File Options

Post by narasimha »

Hi,

I am trying to run a job which creates a HASH file from a table, there arearounf 12 million recordsin the table. In the log the status shows as waiting for the job XXX to start. The status shows as running only after a period of 30 minutes. I am using the default hash file options i.e. Type 30(Dynamic).
1.What are the best options followed for faster completion of the job?2.Should the Allow Stage write cache be enabled
3. Is it better to delete file before create
Any help appreciated
Narasimha Kade

Finding answers is simple, all you need to do is come up with the correct questions.
chucksmith
Premium Member
Premium Member
Posts: 385
Joined: Wed Jun 16, 2004 12:43 pm
Location: Virginia, USA
Contact:

Post by chucksmith »

If you are just writing to the hashed file, then enable write cache.
narasimha
Charter Member
Charter Member
Posts: 1236
Joined: Fri Oct 22, 2004 8:59 am
Location: Staten Island, NY

Post by narasimha »

Thanks for the info
I want to improve/reduce the time taken for writing into the hash file. What changes can i make to the Hash files option???
Narasimha Kade

Finding answers is simple, all you need to do is come up with the correct questions.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

The write cache is good. What you get is writing to random locations in memory rather than writing to random locations on disk (within the file structure, of course). Once all rows have been written, the cache is flushed to disk in group order, which is maximally efficient I/O.

You can preallocate disk space by specifying MINIMUM.MODULUS when creating the hashed file. You can also preallocate disk space by specifying a static hashed file (type 18 for example). The latter course is indicated where the number of rows is known in advance and unlikely to change - or unlikely to change much - over time. Preallocating disk space (that is, preallocating the number of groups) will be beneficial even if write cache is used.

You can not use write cache if you're also reading from the hashed file while it is being written to.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
narasimha
Charter Member
Charter Member
Posts: 1236
Joined: Fri Oct 22, 2004 8:59 am
Location: Staten Island, NY

Post by narasimha »

Thanks Ray

The number of rows cannot be predetermined (So i wont be able to use Static Hash File). For preallocate disk space by specifying MINIMUM.MODULUS do I use the standard formula's or is there any other way we can optimize the performance?
Narasimha Kade

Finding answers is simple, all you need to do is come up with the correct questions.
gpaitch
Participant
Posts: 8
Joined: Thu Feb 05, 2004 5:07 pm

Post by gpaitch »

In the Utilities direcoty of the ds install disk there are some unsupported utilities there. One of these utilities is hfc.exe. This is the Hashed File Calculator, which will provide the modulus based on the number of bytes for each row.
subramanya
Participant
Posts: 22
Joined: Fri Oct 15, 2004 11:53 pm
Location: Bangalore, India
Contact:

"Delete file before create"

Post by subramanya »

Hi,
If we enable "Delete file before create" option in the hash file and run the job repeatedly, we are getting the following error "Unable to delete. The file is allready in the VOC list". This happens with some of the hash files. Can anybody explain Why?

Thnx
Subramanya
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Define "repeatedly"? I'm guessing the delete is failing because it's actually still in use when the attempt is made. :?

Are you sure it doesn't say "Unable to create" instead?

ps. You really should have started a new post on this specific topic, rather than piggy-backing on the end of an existing (but at least semi-related) thread.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply