Posts tagged “uuid”

  1. How do you generate unique IDs across many servers?

    Inserting 5 million rows with random UUIDv4 keys took 34 s and left a 196 MB index at 69% fill; time-ordered UUIDv7 took 21 s with a 150 MB index at 90%; plain bigint 24 s and 107 MB. Database sequences, UUIDv4, UUIDv7 and Snowflake-style IDs compared, measured on PostgreSQL, with when to use which.

    · 6 min read · System Design