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
DataStage int32 vs decimal(10,0)
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 30
- Joined: Thu Jun 06, 2013 9:12 am
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
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
-
- Participant
- Posts: 30
- Joined: Thu Jun 06, 2013 9:12 am
-
- Participant
- Posts: 30
- Joined: Thu Jun 06, 2013 9:12 am
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
- 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
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
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.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.