How UUIDs Actually Work: v4 Randomness, v7 Timestamps, and the Collision Math (opens in new tab)
Every backend developer types uuid() a thousand times before ever asking what those 36 characters actually are. Then one day a senior engineer says "stop using v4 for your primary key, it's wrecking the index," and suddenly the thing you treated as a magic random string has versions, trade-offs, and a surprising amount of math underneath. Here is the whole picture. A UUID is 128 bits wearing a costume A UUID is just a 128-bit number. The familiar form — f47ac10b-58cc-4372-a567-0e02b2c3d479 — ...
Read the original article