Hacker News new | ask | show | jobs
by bambax 12 days ago
Why would you use UUIDs a primary keys? Let SQLite use rowids internally (which is automatic and invisible), and have a different (indexed) column with UUID if you need that for publishing the ID somewhere.
2 comments

UUID as key is useful when you have a distributed system where multiple workers create items independently
Because another app can then create the id and add it to the db later.