Leonardo Schwartz
WWasp
•Created by Leonardo Schwartz on 2/21/2025 in #đŸ™‹questions
Why prisma instead of drizzle?
Yes, I perfectly understand the reasons why. Unfortunately I was looking for a SAAS starter kit I could quickly build on, but I guess I'll have to create my own on top of nextjs. Drizzle is a must for me, and also need a stack with full support for cloudflare workers, D1 and other cloudflare technologies. Love the vision and the project though!
16 replies
WWasp
•Created by Leonardo Schwartz on 2/21/2025 in #đŸ™‹questions
Why prisma instead of drizzle?
And yes, I honestly hate React and would have never considered using it. Sveltekit is so much more elegant and make sense to my brain. However, I came around and started looking back into Nextjs for a simple reason: nowadays most of the code we write is written by LLMs, and LLMs are usually much better at React and Nextjs simply because these are the most popular frameworks online.
DX is a must when you're writing the code, and as I say, I promised myself I wouldn't go back to write React.. EVER. But now if you want to be productive with ai coding agents like Windsurf or Cursor it makes sense to use what's more likely to produce less errors for the coding agent. I'm insisting on this because I think this is something that's not talked about enough, but I honestly think than within 2 years most of these abstractions we have created to make our life easier when coding (frameworks, ORMs and even programming languages) will be completely unneeded and so irrelevant.
16 replies
WWasp
•Created by Leonardo Schwartz on 2/21/2025 in #đŸ™‹questions
Why prisma instead of drizzle?
The not-so-subjective ones:
- Drizzle actually allows you to use the actual specific DB driver you need under the hood, which is not only faster and more efficient in most cases, but also gives you perfect compatibility with specific flavors of, let's say, postgres (neon, etc), sqlite (turso, D1 for instance is a must for me), etc.
- Drizzle is much more flexible than Prisma. With Prisma you can only do what the Prisma engine allows you to do, but Drizzle on the other hand, if you can do something in raw SQL then you can do it with Drizzle. Most apps might not need this flexibility, but then if you hit a edge case down the road where you need it and Prisma doesn't support it... you're out of luck.
- Of course you can do raw SQL with Prisma if needed, but then you lose the type safely. With Drizzle it's all type-safe end-to-end.
- Finally, the elephant in the room: Drizzle is MUCH MORE performant than Prisma, and will likely always be, since it's just a light layer of typescript over the native DB driver, while Prisma has to ship a full query engine to process their DSL.
- Also, for what I heard, while Drizzle dispatches any query (even complex queries with unions, joints, etc) as a single SQL query to the DB, Prisma may convert those into a bunch of queries instead (which is problematic on their own right, specially in serverless environments)
For a short and technical explanation: https://www.youtube.com/watch?v=Xk43fwSQ8No
For a really balanced comparison of both ORMs: https://www.youtube.com/watch?v=cTu9-C2rd-0
This is another unbiased comparison of the two: https://blog.logrocket.com/drizzle-vs-prisma-which-orm-is-best/
For performance benchmarks under different loads: https://orm.drizzle.team/benchmarks
Finally, I want to say that I did indeed read several of your articles and enjoyed then and shared the vision... that's why I'm here!
16 replies
WWasp
•Created by Leonardo Schwartz on 2/21/2025 in #đŸ™‹questions
Why prisma instead of drizzle?
@martinsos thanks so much for taking the time to share your thought process in such detail. From an engineering point of view I wholeheartedly agree with all of those decisions. I personally really dislike adding abstractions where there are no needed, and it's something I'm very weary of when I consider a library for instance (case in point: I absolutely despise Langchain, and cannot understand how they became kind of the standard!)
In regards to Drizzle, and this is also to respond to @miho 's question, there are several things, some subjective but some pretty objective and widely agreed upon:
The subjective one:
- I like drizzle syntax much more. Even if more verbose, it closely resembles the actual SQL query that's being built.
16 replies