37
The perils of UUID primary keys in SQLite
(andersmurphy.com)
Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!
Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.
Hope you enjoy the instance!
Rules
Follow the wormhole through a path of communities !webdev@programming.dev
lots of people, I use them in certain applications. Not sure I’ve ever had a use case where I needed to memorize the PK of my data, but I suppose if you needed that, then a simply INT might be the choice.
As for sorting/creation related to each other, you can use UUIDv7. The first group of bits is time since epoch. So they naturally sort based on time created. Handy!