SQLite Forum

How to rerank one row in a big set of rows?
Login
You are right, doubly-linked list. Without index, it does need 200,000-deep recursive following. 

But with a index, let's say generate 1 index for each 1000 items. The 200,000 items then have 200 indexes. When locating item 5500, the program just need to find the index of 5000, getting the rowid, then go through a 500-deep path. 

When altering one item's rank, only a few indexes need to be updated. 

But indeed, the float number solution is the most implementable method so far.