logoalt Hacker News

matjatoday at 8:20 AM2 repliesview on HN

> UUID versions 1, 2, 3, 4, 5 are already outdated.

Interesting comment, since v4 is the only version that provides the maximal random bits and is recommended for use as a primary key for non-correlated rows in several distributed databases to counter hot-spotting and privacy issues.


Replies

zadikiantoday at 8:54 AM

Yeah v4 is the goto, and you only use something else if you have a very specific reason like needing rough ordering

show 1 reply
bootsmanntoday at 9:45 AM

Really? Doesn’t v4 locally make the inserts into the B-Tree pretty messy? I was taught to use v7 because it allows writes to be a lot faster due to memory efficient paging by the kernel (something you lose with v4 because the page of a subsequent write is entirely random).

show 3 replies