A basic question on Database stage

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
vnspn
Participant
Posts: 165
Joined: Mon Feb 12, 2007 11:42 am

A basic question on Database stage

Post by vnspn »

Hi,

We have a basic question on the way a Database stage works. Suppose we have a SQL on a source database stage that returns 2 million rows, how does DataStage handles it?

Does DataStage executes the SQL and holds the 2 million rows in its memory and passes a chunk by chunk of rows to the next stage or does it process it some way different? If the former happens, then it requires a lot of memory to hold the 2 million records in its memory, right...

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

Post by ray.wurlod »

Typically the database server will establish the result set and the DataStage job will establish a cursor into the result set, fetching an array of rows at a time. There are variations on this theme, but in no case (in server jobs) does DataStage cache the entire data set in memory.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
vnspn
Participant
Posts: 165
Joined: Mon Feb 12, 2007 11:42 am

Post by vnspn »

Thanks for the information Ray!

You say that, in Server Jobs, DataStage does not cache the entire data set in memory. Is it the same way in Parallel Job as well or different?
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Yes. No. Maybe. Depends on the stage type.

Your question was in the server forum, so got a server job answer.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
vnspn
Participant
Posts: 165
Joined: Mon Feb 12, 2007 11:42 am

Post by vnspn »

Ok, thanks.

I would post this in Parallel job forum to get the answer for the parallel job stages.
Post Reply