DEV Community

Cover image for From Prisma to Drizzle: Shedding the Magic, Embracing SQL
Alex Escalante
Alex Escalante

Posted on

From Prisma to Drizzle: Shedding the Magic, Embracing SQL

When we first decided to use Prisma ORM for one of our Node.js services, I was genuinely happy with the choice. It offers a very ergonomic API—“friendly” at first glance, though you still have to figure it out—and it allowed my team to work without deep SQL knowledge.

But then, things changed.

As we got deeper into SQL, started using stored procedures, and explored more of PostgreSQL’s powerful features, Prisma began to feel more like an obstacle than a solution. Instead of facilitating our workflow, it made working with these advanced SQL features more cumbersome.

One thing that really started to bother me was the way Prisma applies magic to return types. It makes them practically impossible to share seamlessly, for instance, with my React clients. I still had to manually define all my DTOs, which felt like a step backwards. Maybe I was naive to expect otherwise, but for a while, I even considered writing my own Prisma plugin to generate DTOs—an overly complex path, to say the least.

So, when the time came to build a new service backed by PostgreSQL, we decided to take a different approach. Enter Drizzle ORM.

Drizzle is simpler. It feels more like writing SQL. There’s no overwhelming magic, just solid TypeScript support that actually helps rather than gets in the way. Sure, I still have to write my DTOs by hand when needed, but at least I’m not stumbling through Prisma’s enchanted forest of abstractions.

In the end, I’d rather have control than illusions.

PD: Did I mention Drizzle is waaay more performant than Prisma?

Hostinger image

Get n8n VPS hosting 3x cheaper than a cloud solution

Get fast, easy, secure n8n VPS hosting from $4.99/mo at Hostinger. Automate any workflow using a pre-installed n8n application and no-code customization.

Start now

Top comments (0)

Qodo Takeover

Introducing Qodo Gen 1.0: Transform Your Workflow with Agentic AI

Rather than just generating snippets, our agents understand your entire project context, can make decisions, use tools, and carry out tasks autonomously.

Read full post

Best practices for optimal infrastructure performance with Magento

Running a Magento store? Struggling with performance bottlenecks? Join us and get actionable insights and real-world strategies to keep your store fast and reliable.

Tune in to the full event

DEV is partnering to bring live events to the community. Join us or dismiss this billboard if you're not interested. ❤️