I Stopped Using ORMs. Here’s Why You Should Too.

I spent three hours last week debugging an ORM query. Three hours. The same result could have been written in SQL in about three minutes. And that’s when I finally admitted what I’d been suppressing for years: ORMs are a lie we tell ourselves to feel productive.

We’re sold on the promise. “Write your database logic in your application language!” “Never touch SQL again!” It sounds like freedom. But what you get instead is a black box that generates incomprehensible queries, hides performance cliffs, and makes you feel stupid when it breaks. Every ORM is a leaky abstraction, but we treat it like a magic box. And then we blame ourselves when the magic fails.

I’ve been using Rails’ ActiveRecord, Hibernate, Entity Framework—you name it. And every single one has taught me the same lesson: Learn SQL. It’s harder initially, but it’s the only path to real mastery. The frustration of wrestling with ORM behavior—the N+1 queries that silently kill performance, the lazy loading that happens when you least expect it, the entire database schema being dictated by your ORM’s conventions—is replaced by the quiet pride of writing clean, efficient SQL that you fully control.

But here’s the twist that nobody talks about: mastering SQL isn’t the final destination. The real next step is to go even deeper—ditch SQL itself and learn the storage engines that sit below it, like LMDB or RocksDB. The cycle of abstraction constantly pulls us away from fundamental truths, and the bravest developers are the ones who descend, not ascend. When you understand how data is actually stored and retrieved at the bits-and-bytes level, the ORM looks like a child’s drawing of a house.

Of course, the industry will tell you otherwise. “Just use an ORM for productivity.” “SQL is outdated.” “You don’t need to understand the database—that’s the DBA’s job.” That’s the same logic that says you don’t need to understand how a car engine works to drive it. True—until it breaks down on the highway. Hire a mechanic mentality is why most software teams spend 40% of their time debugging, not building.

I’m not saying you should never touch an ORM again. They have their place—for simple CRUD apps, rapid prototyping, or when you’re working with a team that doesn’t have deep database knowledge. But if you call yourself a backend engineer and you can’t write a performant JOIN without your ORM holding your hand, you’re not building—you’re assembling. And the difference between an assembler and a builder is the difference between a cog and an engineer.

So here’s my challenge: spend the next month writing raw SQL for every new feature. No query builders, no ORMs. See how many performance bugs you avoid. See how much more confident you feel when a query goes wrong. You will learn more in that month than in a year of ORM-driven development. And when you go back to using an ORM, you’ll treat it like what it is: a convenience tool, not a crutch.

FAQ

Q: Aren't ORMs necessary for productivity in modern development?

A: Not really. They save time on simple queries but cost far more on complex ones. Most teams spend hours debugging ORM-generated SQL that they don't understand. Raw SQL is a one-time learning investment with perpetual returns.

Q: What's the practical takeaway for a team currently using an ORM?

A: Start auditing the SQL your ORM generates. Use EXPLAIN ANALYZE to spot inefficiencies. Then, for any performance-critical path, write raw SQL instead. You'll immediately see fewer N+1 problems and better query plans.

Q: Isn't learning storage engines like LMDB overkill for most applications?

A: It's not for everyone, but understanding the fundamentals will radically change how you design data access. Even without going that deep, the mindset shift from 'what abstraction makes this easy' to 'what data structure actually solves this' is invaluable.

📎 Source: View Source