Hacker News new | ask | show | jobs
by heckraiser 905 days ago
Both ULID and UUID v7 have a time code component which can be extracted.

It would be best for indexing to store the actual value in binary, though not strictly necessary as these later UUID standards (unlike conventional UUIDs) use time code prefixes (so indexing clusters.)

https://uuid7.com/

https://github.com/ulid/spec

1 comments

An almost canonical example of irrelevant and unnecessary optimization.

This would matter if you lived long enough to publish tens of millions of newsletters. Sadly, typical human lifespan will likely limit the table to fewer than 36,000 rows.

The oldest continually published newspaper, the Gazzetta di Mantova [1] has approximately 131,000 issues. That spans many human lifetimes, but doesn't begin to come close to a large number of rows that would need any serious attention paid to database index format or length, clustering, UUIDs, etc.

[1] https://en.wikipedia.org/wiki/Gazzetta_di_Mantova