db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Karl Weber <karl.webe...@googlemail.com>
Subject Sequence loses numbers: bug or feature?
Date Sun, 26 Feb 2012 08:45:46 GMT
I have created a sequence using

CREATE SEQUENCE GPS.SDSID 
	AS INTEGER
	START WITH 1 
	INCREMENT BY 1 
	NO CYCLE;

and get values using

NEXT VALUE FOR GPS.SDSID

in separate SELECT statements with jdbc. The corresponding connection has 
autocommit = true.

As long as derby is running I get successive numbers, but when derby is shut 
down in between I get gaps. Those gaps are quite bad.

Is this a bug or a feature, i.e. is derby buffering about five sequence 
numbers in memory (for, e.g., performance reasons), which are lost if derby is 
shut down? Is there a way to prohibit losing numbers?

Mime
View raw message