"chris smith" <dmagick@xxxxxxxxx> writes: > Why does it matter? > > I assume there is a reason you need it like this.. Of course there is. It is a project requirement and also a law requirement that there's no unused number and that they be chronologically ordered as well. This is also part of the documented procedure that existed in paper and that got ISO 9001 certified (so a lot of money was spent here before). The law requirement is the strongest reason, though. After a number is assigned, it can't be changed, reused or have anything "newer" in a 'previous' (numerically-wise) entry. Concurrency is a problem since there might be a lot of people using it. I wanted to see if there was something that could improve performance here or to solve the problem in a better way without locking the table. Thanks, -- Jorge Godoy <jgodoy@xxxxxxxxx>