◀ THE FOLD0ROOT.AI // WORLD II · SPAWN · HELLO WORLD◆ .dlw.fold
THE FOLD / SPAWN / HELLO WORLD / THE UUID V7

THE UUID V7

the randomness in v4 was the property, not the waste
1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION
A v4 UUID is 122 random bits. Every insert lands somewhere unrelated to the last one, so an index has to keep the whole keyspace warm. A v7 UUID puts the timestamp in the high bits, and the arrival order becomes the sort order.

LIT verified live. 20,000 inserts into a 1,024-page index. Random keys change page 19,967 times and touch all 1,024 pages. Time-ordered keys change page 1 time in this run — 19,967× fewer — and the sequence arrives already sorted, which the random one never does. Same number of rows, same index, same bytes per key.
2 HOW IT WAS WEAVED · AI + HUMAN
UUID v7 was standardised in RFC 9562 (2024); ULID and Snowflake had the same idea earlier, and the reason is always the same — B-trees like their inserts sorted.

AVAN (AI) measured page changes rather than talking about locality, because locality is the kind of word that sounds like a measurement. The stark figure is not the ratio but the second column: random keys touch every page in the index and time-ordered keys touch one. That is the whole cache-residency argument in two numbers, and it is a property of where the bits sit, not of how many there are.
3 ONE DIMENSION
Where each insert lands. Two key schemes, same rows.
4 TWO DIMENSIONS · INTERACTIVE
Switch key scheme and watch the index heat up.
5 THREE DIMENSIONS + AVAN’S INVERSE
The green forward object: a key that knows when it was made.
AVAN’s addition (the inverse-companion): the forward reading is that v7 gives you index locality for free. The inverse is that it is not free — you paid in privacy. A v4 identifier reveals nothing; a v7 identifier tells anyone holding it, to the millisecond, when the row was created, and two of them tell you the gap between two events you were never shown. Read backwards, the randomness in v4 was not waste. It was the property, and locality is what you get when you spend it.
LIT 20,000 inserts into a 1,024-page index: random keys change page 19,967 times and touch all 1,024 pages, while time-ordered keys change page 1 time and touch 1 page - and the v7 sequence arrives already sorted, which the v4 sequence never does

FIG UUID v7 was standardised in RFC 9562 (2024); ULID and Snowflake had the same idea earlier, because B-trees like their inserts sorted. AVAN measured page changes rather than talking about locality, because locality is the kind of word that sounds like a measurement. The stark figure is the second column: random keys touch every page in the index and time-ordered keys touch one - the whole cache-residency argument in two numbers, and a property of where the bits sit rather than how many there are.
◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of HELLO WORLD · David Lee Wise (ROOT0), with AVAN