DataStage int32 vs decimal(10,0)

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
meriem_ens
Participant
Posts: 30
Joined: Thu Jun 06, 2013 9:12 am

DataStage int32 vs decimal(10,0)

Post by meriem_ens »

Hi,

Memory wise, what gives the best performance, declaring a column int32 or decimal(10,0) ?

I'm asking myself this question because I need to load a sql server table into oracle

The table consists of columns with the int datatype. In sql server the int datatype is like a number(10) in oracle. In my job what would be better (performance but also best practice)

1) read the sql server column with datastage integer datatype, then write the column to oracle with the datastage decimal(10,0) datatype

or

2) read the sql server column with the datastage decimal(10, 0) datatype, then write the column to oracle with the decimal(10,0) datatype.

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

Post by chulett »

I'm not sure any of this affects 'performance' per se. What is your actual Oracle datatype?
-craig

"You can never have too many knives" -- Logan Nine Fingers
Mike
Premium Member
Premium Member
Posts: 1021
Joined: Sun Mar 03, 2002 6:01 pm
Location: Tampa, FL

Post by Mike »

It's good to see that you have performance awareness, but this is a nit and not something to be concerned with.

Whatever difference there is between an int32 and a decimal(10,0) is probably too small to measure and would get lost in the "noise".

An int32 is 4 bytes and a decimal(10,0) would be 6 bytes if it's in a packed decimal internal format.

To generalize, computer systems handle binary data more efficiently than decimal data.

Save your performance hawking for orders of magnitude differences. For example, jobs that run in hours instead of minutes or days instead of hours.

Mike
meriem_ens
Participant
Posts: 30
Joined: Thu Jun 06, 2013 9:12 am

Post by meriem_ens »

chulett wrote:What is your actual Oracle datatype?
It's number(10, 0)
meriem_ens
Participant
Posts: 30
Joined: Thu Jun 06, 2013 9:12 am

Post by meriem_ens »

When I used the view data feature of datastage I had this :

- for integer the values are displayed 1, 2, 3, 4
- for decimal(10, 0) the values where displayed 0000000001., 000000002., 0000000003., 0000000004.

I guess it's just a display format and not the internal representation in DataStage.

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

Post by chulett »

Correct.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

DataStage, when converting Decimal to String (for example for display or writing to text files), adds leading and trailing zeroes in accordance with the precision and scale settings.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
meriem_ens
Participant
Posts: 30
Joined: Thu Jun 06, 2013 9:12 am

Post by meriem_ens »

Thank you both.
Post Reply