> On Nov 21, 2017, at 1:56 AM, R Smith <rsm...@rsweb.co.za> wrote:
> 
> That assumes you are not starting from an integer part (like 4000) and 
> hitting the exact same relative insert spot every time, which /can/ happen, 
> but is hugely unlikely.

Not to beat this into the ground, but: it’s not that unlikely. Let’s say you 
sort rows by date. You’ve already got some entries from 2015 in your database, 
and some from 2017. Someone now inserts 60 entries from 2016, and to be 
‘helpful’, they insert them in chronological order. Wham, this immediately hits 
that case.

(This is similar to the problem that some tree data structures have, where 
adding entries in sorted order results in the must unbalanced possible tree.)

It’s a lot better to use strings, and just increase the length of the string as 
necessary. So to insert in between “A” and “C” you add “B”, then to insert 
between “A” and “B” you add “AM”, etc.

—Jens
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to