SCD Stage

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
venkatvelpula
Participant
Posts: 80
Joined: Sat Mar 18, 2006 10:27 pm

SCD Stage

Post by venkatvelpula »

As far as best practices front,

Is State file better option than DB sequence for surrogate key generation?

If so, Why?
SURA
Premium Member
Premium Member
Posts: 1229
Joined: Sat Jul 14, 2007 5:16 am
Location: Sydney

Re: SCD Stage

Post by SURA »

It will prefer DB rather than file, as i had the bad experience "file corrupted"

DB is safe.

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

Post by ray.wurlod »

If you don't do anything to corrupt the state file, such as opening it with a text editor, the state file is also perfectly safe - it does not corrupt itself.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
SURA
Premium Member
Premium Member
Posts: 1229
Joined: Sat Jul 14, 2007 5:16 am
Location: Sydney

Post by SURA »

You are right. But what i did is , referred the same file in different jobs to get the unique id for the whole project.

DS User
venkatvelpula
Participant
Posts: 80
Joined: Sat Mar 18, 2006 10:27 pm

Post by venkatvelpula »

Is there any performance bottle neck for one vs other?
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Is your database local or remote to the DataStage engine? If it's remote then a state file, which perforce must be local, will definitely perform better.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
venkatvelpula
Participant
Posts: 80
Joined: Sat Mar 18, 2006 10:27 pm

Post by venkatvelpula »

Database is remote. I can't understand the resposne perforce. Is that performance?

How can the state file perform well..could you explain in detail?
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

The word "perforce" is an adverb meaning "necessarily".

I claim only that getting a block of keys out of a local state file will be quicker than sending a request over a network to invoke a database and issue a query against a sequence in that database then wait for the response from that database.

I make no claim about the "performance" of a state file, because it makes no sense to do so. What are your criteria?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
SURA
Premium Member
Premium Member
Posts: 1229
Joined: Sat Jul 14, 2007 5:16 am
Location: Sydney

Post by SURA »

If a DB2 Sequence created, then it will be local right?

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

Post by ray.wurlod »

Not necessarily. It will be wherever the DB2 database is.

If you're thinking of using a sequence in XMETA, there's still no requirement for the database (metadata repository tier) to be co-resident with the engine tier.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply