2 ms·
Various discussion about something similar at https://news.ycombinator.com/item?id=16946557 https://news.ycombinator.com/item?id=16946557 . This concerned the e
by eesmith 9y ago
Various discussion about something similar at https://news.ycombinator.com/item?id=16946557 https://news.ycombinator.com/item?id=16946557 . This concerned the essay "User IDs probably shouldn't be passed around as ints" at https://rachelbythebay.com/w/2018/04/27/uid/ https://rachelbythebay.com/w/2018/04/27/uid/ .
The author argues that auto incrementing ints have additional failure modes that sparse integers don't have, even if those sequential values aren't user-facing.
If they have a created datestamp then if you index them then it's easy to get last-n.