Scratch and Resource disk space

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
cdw
Premium Member
Premium Member
Posts: 9
Joined: Wed Jul 01, 2009 10:02 am

Scratch and Resource disk space

Post by cdw »

Hello All,

We have many columns in our source tables where data type is varchar(500). However in actual practice many of these values are null and not more than 15 characters. My understanding was if we use sort then actual scratch disk space requirement would be (average row length * record count). But I have observed that datastage is taking maximum row length. Due to this we need huge resource disk space. Is there any option by which sort will only take actual row size into consideration while creation files in scratch disk.
Same thing is for resource disk as well.

Thanks in advance.

-CDW
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Don't believe so.

But you could redefine them as, say, VarChar(20), add a field to identify the row number, and join back to the original data later if needed. Alternately you could define them as unbounded VarChar.
Last edited by ray.wurlod on Wed Jul 22, 2009 4:56 pm, edited 1 time in total.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
miwinter
Participant
Posts: 396
Joined: Thu Jun 22, 2006 7:00 am
Location: England, UK

Post by miwinter »

Your datatype is a varchar, so by nature is variable length. Defining it with a ceiling value (max) of 500 or otherwise will reserve that space for every single record. Is there any need for this ceiling value in your requirement? If not, remove it altogether and just state it as a varchar, which will prove far more space efficient :D. The same holds true for datasets as well as scratch.
Mark Winter
<i>Nothing appeases a troubled mind more than <b>good</b> music</i>
cdw
Premium Member
Premium Member
Posts: 9
Joined: Wed Jul 01, 2009 10:02 am

Post by cdw »

Thanks miwinter!!! Its now working as per expectations!
miwinter
Participant
Posts: 396
Joined: Thu Jun 22, 2006 7:00 am
Location: England, UK

Post by miwinter »

Glad to be of service :)
Mark Winter
<i>Nothing appeases a troubled mind more than <b>good</b> music</i>
cdw
Premium Member
Premium Member
Posts: 9
Joined: Wed Jul 01, 2009 10:02 am

Post by cdw »

Hello All,

Is there any other way to achieve this without removing ceiling/size? This is especially important to retain the size when we want to use Metastage for metadata management.

Thanks,
-CDW
shankar_ramanath
Premium Member
Premium Member
Posts: 67
Joined: Thu Aug 09, 2007 7:51 pm

Post by shankar_ramanath »

>> But I have observed that datastage is taking maximum row length.

cdw,

How were you able to determine this?

Could you please elaborate on how you checked the space in scratch disk. I have noticed that it is hard to relate the scratch disk location to the actual job that generates it.

Thanks,
cdw
Premium Member
Premium Member
Posts: 9
Joined: Wed Jul 01, 2009 10:02 am

Post by cdw »

Hi Shankar,
I have monitored the scratch disk usage when DS was processing the data at sort stage. I observed that row length * record count was exactly matching with disk usage.
Thanks,
-CDW
Post Reply