Please do not copy the CREATE SEQUENCE statement I used without testing
it. I did not realize that, at least the version I was using, did not
handle the "NOCACHE" keyword in the way I was intuitively thinking.
A friend that had followed the discussions better, told me to insert
"CACHE 1" into the statement to avoid ranges of unused values after
restart of the server software, but I found some command syntax on the
network and was thinking that "NOCACHE" must obviously be a more explicit
and better way to say that I do not want to do any kind of preallocation
of extra numbers from the sequence.
I realized, after sending my previous mail, that "NOCAHCE" did not
solve my problem. The interresting thing is that "CACHE 1" seem to solve
the problem and the "NOCACHE" keyword was already in use by the
application that sometimes left some numbers unused.
I have NOT YET upgraded to a newer version so my experiences are from:
OS: Windows XP Professional.
SAPDB: Kernel : Kernel 7.3.0 Build 020-000-000-000
Runtime Environment : NT/INTEL 7.3.0 Build 020-000-000-000
To reproduce my results: Do like this:
===========================================================
create table xxxx(k integer primary key, v integer not null)
create sequence xxxx11 increment by 1 start with 1000 maxvalue 2147483647 nocache
create sequence xxxx12 increment by 1 start with 1000 maxvalue 2147483647 cache 1
insert into xxxx(k, v) values (11110000,xxxx11.nextval)
insert into xxxx(k, v) values (11110001,xxxx11.nextval)
insert into xxxx(k, v) values (12120000,xxxx12.nextval)
insert into xxxx(k, v) values (12120001,xxxx12.nextval)
<reboot now>
insert into xxxx(k, v) values (11110002,xxxx11.nextval)
insert into xxxx(k, v) values (11110003,xxxx11.nextval)
insert into xxxx(k, v) values (12120002,xxxx12.nextval)
insert into xxxx(k, v) values (12120003,xxxx12.nextval)
select * from xxxx
K V
================
11110000 1000
11110001 1001
11110002 1021
11110003 1022
12120000 1000
12120001 1001
12120002 1002
12120003 1003
===========================================================
Best regards !
Hans Davidson <[EMAIL PROTECTED]>
_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general