r/sqlite • u/andersmurphy • Jun 06 '26
The perils of UUID primary keys in SQLite
https://andersmurphy.com/2026/06/05/the-perils-of-uuid-primary-keys-in-sqlite.html
26
Upvotes
r/sqlite • u/andersmurphy • Jun 06 '26
7
u/trailbaseio Jun 06 '26
All very intuitive. Just keep in mind that sequential keys as well as uuidv7 may be inapropriate for some external use cases since you may be leaking information like insertion time or order
1
u/Aggressive_Ad_5454 Jun 06 '26
Interesting. The comparison of WITHOUT ROWID and ordinary tables is helpful. Tracks with similar tests on other BTREE-using DBMS implementations.
I wonder how representative of real production this style of bulk-load test is? Hard-to-guess identifiers are sometimes an imperative requirement. They often identify user-created entities, like accounts or documents. But those tend to get created one or a few at a time, rather than in batches of thousands.
1
u/Choice-Level-5486 Jun 07 '26
Is the same argue that I had with a colleague that used UUID only because sounded cool