El 15/10/16 a les 19:49, Jens Alfke ha escrit:

On Oct 15, 2016, at 7:42 AM, Luca Olivetti <l...@wetron.es> wrote:

Instead of an autoincrement you could increment it manually in, say, 1000 
increments.
Then, when you have to insert something between 1000 and 2000 you just use 1500.

Unfortunately this breaks down after log2(1000) ≈ 10 insertions, when you may 
have to insert in between two consecutive IDs like 1324 and 1325.

I'm aware of the limitation but for my application[*] it is perfectly fine, maybe it is also ok for the OP, maybe it isn't.

[*] I have to insert records in the given order but the user may occasionally rearrange them.

Bye
--
Luca Olivetti
Wetron Automation Technology http://www.wetron.es/
Tel. +34 93 5883004 (Ext.3010)  Fax +34 93 5883007
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to