logoalt Hacker News

hnavyesterday at 5:18 PM1 replyview on HN

depends on the database, famously DynamoDB used to suffer from hotspotting when dealing with monotonically increasing keys


Replies

the_mitsuhikoyesterday at 5:27 PM

You're missing the point here. You can always go from ordered to randomness. You cannot go from randomness to ordered. So by intentionally removing the useful properties of UUIDv7, you're taking away some external API consumers' hypothetical possibility to leverage benefits. If I know (as an API consumer) that I have a database that for whatever reason prefers evenly distributed primary keys or something similar, I can always accomplish that by hashing. I just can never go the other way.

show 3 replies