DatabaseSchema Design·14 min read
UUID v4 vs UUID v7 vs Snowflake — Pick the Right Primary Key
A plain-English walkthrough: how B-tree inserts actually work, what a page split costs, why random UUID v4 keys bloat the index by 2× and blow the buffer pool. For each ID — UUID v4, Snowflake, UUID v7, AUTO_INCREMENT — what it is, why people pick it, what breaks. Real MySQL benchmark at 10M rows, Postgres differences, and a dual-write migration that works.
DatabaseMySQLPostgreSQLSchema DesignRead →