Video summary
Is Drizzle Really Better Than Prisma?
Main summary
Key takeaways
Product reviewed
The video compares Drizzle ORM vs Prisma ORM (TypeScript/JavaScript ORMs) and whether Drizzle can replace Prisma.
Key points / features mentioned (unique)
- Purpose (both): ORMs that map a database to code and simplify querying/CRUD (create/read/update/delete).
- Database support (both): Work with many common databases (SQL and NoSQL) via drivers.
- Driver flexibility (Drizzle advantage):
- Drizzle offers more customization over which underlying driver powers it.
- Prisma is described as being “harder” to customize because it uses its own Prisma engine/approach behind the scenes.
-
Studio/Admin UI (both): Both have a similar Studio app to inspect and edit database data in an admin-like panel.
-
CLI / migrations workflow (both):
- Drizzle uses Drizzle Kit.
- Prisma has an equivalent built-in workflow.
- Both support migrations and syncing schema to the DB.
- Setup experience (Prisma advantage):
- Prisma is easier to set up (example given:
npx prisma initgenerating most things automatically). - Drizzle is more difficult initially because setup depends on the chosen driver; it requires copying/assembling more boilerplate.
- Prisma is easier to set up (example given:
- Schema definition style (Prisma advantage for readability; Drizzle advantage for “no custom language”):
- Prisma: uses a custom schema language (
schema.prisma), described as shorter and easier to read. - Drizzle: schema is written in normal TypeScript, but is more verbose.
- Prisma: uses a custom schema language (
- Relations/query ergonomics (Prisma advantage):
- Prisma “automatically” handles relationship querying more seamlessly (less manual relation setup in queries).
- Drizzle requires more explicit relation/query builder code (more boilerplate/headache).
-
Simple queries (tie-ish): For basic inserts/deletes, syntax differs but overall complexity is similar.
-
Complex inserts with relations (Prisma advantage):
- Example: creating discount codes and linking them to products.
- Prisma can do it in one function call, while Drizzle requires extra joining-table code.
- Querying complexity (big tradeoff):
- Prisma: easier to reason/write for typical ORM-style queries, but more restrictive for advanced patterns.
- Drizzle: offers a query API similar in basic ergonomics, plus the ability to write custom SQL.
- Advanced querying / aggregations (Drizzle advantage):
- Prisma limitations described around certain aggregations/operations.
- Drizzle can do nearly everything SQL can do (joins, group by, having, etc.) while maintaining type safety.
- Prisma can do raw SQL but loses type safety for raw SQL.
- Type safety (tie):
- Both provide strong TypeScript type safety.
- Difference in generation:
- Drizzle: type safety comes from the TypeScript-defined schema.
- Prisma: parses
schema.prismato generate types.
- Performance & speed (Drizzle advantage):
- The video claims Drizzle is faster and “often drastically faster.”
- Reasoning: Drizzle is a thinner layer and focuses on speed; Prisma does more processing via its engine.
- Batching/round-trips:
- Drizzle tends to send fewer/single DB queries for multiple operations.
- Prisma may send multiple queries (1 to 100+ depending on code paths).
- Serverless/cold start (Drizzle advantage):
- Prisma cold starts in serverless are described as a major pain point.
- Drizzle is much faster at cold start.
- Prisma mitigation mentioned: Prisma Accelerate (not personally tested by the speaker).
- Documentation (Prisma advantage):
- Both have good docs, but Drizzle is newer (example versions mentioned: Drizzle 0.2.8 vs Prisma 5.1).
- Prisma wins for getting started documentation; Drizzle’s deeper docs are “very thorough” but getting started is “iffy.”
- Ease of use / learning curve:
- Drizzle: more advanced; requires stronger SQL knowledge (joins, join types, etc.).
- Prisma: more beginner-friendly because it abstracts away many SQL details.
- Overall recommendation logic:
- Choose Drizzle if you want flexibility, custom SQL with type safety, and/or serverless/performance.
- Choose Prisma if you want ease of setup, readable schema, less query boilerplate, and better getting started docs.
Pros / cons as stated
Drizzle pros
- More configurable driver flexibility
- Faster performance, including better serverless cold start
- Write custom SQL while keeping type safety
- Can handle advanced SQL patterns more directly
Drizzle cons
- Harder initial setup (driver-specific boilerplate; more steps)
- More verbose schema (TypeScript-based but longer)
- Requires more boilerplate for relations
- Requires stronger SQL knowledge; harder for beginners
- Docs: “getting started” is weaker (though overall thorough)
Prisma pros
- Easier setup (auto-generated scaffolding; simpler initial workflow)
- Schema definition is shorter/readable via custom schema language
- Better relation querying ergonomics (less manual joining-boilerplate)
- Easier ORM-style querying for typical use cases
- Better getting-started documentation
- Type safety still strong
Prisma cons
- Less flexibility (restricted to what Prisma ORM supports)
- Raw SQL execution lacks type safety
- Performance described as slower due to thicker engine processing
- Serverless cold start issues (mitigated by Prisma Accelerate, but not proven in video)
Comparisons made (explicit)
- Setup: Prisma’s command-based scaffolding vs Drizzle’s driver-dependent, manual assembly.
- Schema: Prisma schema language vs Drizzle TypeScript schema (verbosity).
- Relations/queries: Prisma “automatic” relational handling vs Drizzle needing extra relation/query builder logic.
- Advanced SQL/aggregations: Drizzle custom SQL + type safety vs Prisma restrictions (and untyped raw SQL).
- Performance/serverless: Drizzle designed for speed + thinner layer vs Prisma engine processing and serverless cold start pain.
Ratings / numerical scores
- No overall numeric rating given.
- Versions mentioned: Drizzle 0.2.8 and Prisma 5.1 (used to support a documentation maturity argument).
- Performance claims rely on benchmarks from Drizzle’s website (speaker notes possible bias).
User experience summary (how it feels to use)
- Beginner/less SQL confidence: Prisma is framed as smoother—less boilerplate, easier relations, easier setup.
- Advanced users wanting control/performance: Drizzle is framed as better—requires SQL comfort, but offers flexibility and potential speed gains.
Verdict / overall recommendation (concise)
- If you want best performance and serverless speed, and you’re comfortable writing SQL (or want custom SQL with type safety): choose Drizzle.
- If you want easier setup, more ergonomic schema/relations, and simpler ORM-style querying (especially for beginners): choose Prisma.
- The speaker concludes there’s no single right answer, and suggests using both depending on project needs.
Speaker notes
- Single main speaker (Kyle / WebDev Simplified) providing both the comparison framework and personal experience-based conclusions.