Menu

I got tired of "SELECT 1" microbenchmarks, so I tested 25 ORMs across 9 languages against a real 78M-row Postgres database. Here is what broke.

#backend#redditbackend#rows#line#haskell
Reading 0:00
15s threshold

Every ORM benchmark I see online tests the same trivial query: SELECT * FROM users WHERE id = 1;

This doesn't benchmark an ORM. It benchmarks Linux loopback TCP socket round-trip time.

In production, ORMs don't fall over on primary-key lookups. They buckle when: 1. Deserializing 10,000 wide rows into typed structs under memory pressure. 2. Materializing 4-level deep entity graphs without Cartesian explosions or N+1 floods. 3. Compiling recursive CTEs, multi-frame window functions ( ROWS BETWEEN 4 PRECEDING ), or pgvector cosine similarity. 4. Squeezing 100 concurrent workers competing for row locks ( SELECT ... FOR UPDATE ) through a constrained connection pool. 5.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.