Using seq.nextval without using user-defined sql

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
vpauls
Premium Member
Premium Member
Posts: 37
Joined: Mon May 09, 2005 2:26 am
Location: Oslo

Using seq.nextval without using user-defined sql

Post by vpauls »

Is it possible to set a column as seq.nextval without using user-defined sql?

I have done this using user-defined sql but it makes the server job a lot more cumbersome to modify.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Only by putting the 'nextval' select into a lookup, from what I've seen.
-craig

"You can never have too many knives" -- Logan Nine Fingers
vpauls
Premium Member
Premium Member
Posts: 37
Joined: Mon May 09, 2005 2:26 am
Location: Oslo

Post by vpauls »

chulett wrote:Only by putting the 'nextval' select into a lookup, from what I've seen.
I have played around with that, but it is extremely slow.

A minor speed test using 1000 000 input rows. Showed that
- user defined sql had 20000 rows/sec
- using a DB trigger to insert nextval about 9000 rows/sec
- using lookup only for nextval had 500-1000 rows/sec
- looking up nextval together with source data 5-6000 rows a second.

The source table consisted of the number 1 - > 1000 000
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Never said it was speedy or a better approach. :wink:
-craig

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