Hacker News new | ask | show | jobs
by piterrro 24 days ago
For anyone interested in the topic I suggest reading about snowflake id [https://en.wikipedia.org/wiki/Snowflake_ID] or uuid7 the patterns from the article translate cleanly. The bigint is 64 bytes where uuid is 128. There are other caveats but its all about tradeoffs.
1 comments

Technically - as Postgresql stores the UUID data type as binary, it's 16 bytes.
Oh, I meant bits not bytes. You are right, the uuid in psql is 16 bytes, the bigint is 8 bytes.