OCI Stage - Data not loaded in a sorted order

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
rsrikant
Participant
Posts: 58
Joined: Sat Feb 28, 2004 12:35 am
Location: Silver Spring, MD

OCI Stage - Data not loaded in a sorted order

Post by rsrikant »

Hi Everyone,

I observed this many times. When i load data from a sequential file to oracle using a OCI stage the data is not getting loaded in the same order in which it is available in the sequential file.

For eg:

sequential file has records like..

1990 Q1 12
1990 Q2 13
1990 Q3 12
1990 Q4 13
1991 Q1 12
1991 Q2 13
1991 Q3 12
1991 Q4 13
1992 Q1 12
1992 Q2 13
1992 Q3 12
1992 Q4 13

i run the job which reads from seq file passes through the transformer (no derivations - direct mapping) and loads into oracle using OCI stage.

The output is not in the same order.

It may load like

1991 Q3 12
1991 Q4 13
1992 Q1 12
1992 Q2 13
1990 Q1 12
1990 Q2 13
1990 Q3 12
1990 Q4 13
1991 Q1 12
1991 Q2 13
1992 Q3 12
1992 Q4 13

Any idea why it is loading like this? Is it common? i observed this in many of my jobs.

Any ideas will be helpful.

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

Post by ray.wurlod »

It is a fundamental rule of databases that order of storage is not determinable. The database server makes its own decisions about where to store things. Unless you specify ORDER BY in a query to retrieve those data, you'll get whatever the database server chooses to give you.

This is NOT a DataStage issue.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

It's not even an issue, just The Way It Works. :wink:
-craig

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