Subject | Generators questions |
---|---|
Author | Ionut Ichim |
Post date | 2007-04-30T18:03:03Z |
I've created a table (table1) with IDcod as pk numeric(18,0),then a generator
CREATE GENERATOR GEN_N;
SET GENERATOR GEN_N TO 1;
I've inserted 3 records for IDcod values 5,6,7.
With IBExpert Personal,in a script I put this :
SELECT gen_id(gen_N,1) FROM table1;
Result :
2 3 4
run again
5 6 7
Why generator creates such result, for each record a value generated.
Where is the value i look for ?
Wouldn't it be slow for a big database ?
Why generator creates values that can duplicate pk,or I have to use generator from the start ?
Thanks.
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
[Non-text portions of this message have been removed]
CREATE GENERATOR GEN_N;
SET GENERATOR GEN_N TO 1;
I've inserted 3 records for IDcod values 5,6,7.
With IBExpert Personal,in a script I put this :
SELECT gen_id(gen_N,1) FROM table1;
Result :
2 3 4
run again
5 6 7
Why generator creates such result, for each record a value generated.
Where is the value i look for ?
Wouldn't it be slow for a big database ?
Why generator creates values that can duplicate pk,or I have to use generator from the start ?
Thanks.
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
[Non-text portions of this message have been removed]