4 ms·
Interesting. Could you share more about the performance characteristics of EdgeDB + TypeScript vs say Prisma + other DB?
by mfester 3y ago
Interesting. Could you share more about the performance characteristics of EdgeDB + TypeScript vs say Prisma + other DB?
- RedCrowbar 3y agoWe wrote a blog post about this specifically: https://www.edgedb.com/blog/why-orms-are-slow-and-getting-slower https://www.edgedb.com/blog/why-orms-are-slow-and-getting-sl...
- 1st1 3y agoThat's a good question! Prisma (not to single it out, basically any ORM on the market) struggle with composition. What this means is that an innocently looking API call in your ORM can translate into a multitude of actual SQL queries sent to the server one by one. This just balloons the database latency of your backend degrading quality of service everywhere. EdgeDB's TypeScript query builder gives you the same type safety benefit that Prisma gives you, but its main feature is that it builds EdgeQL for you. And EdgeQL is very, very good for composition and pipelining multiple operations in one single query. You can select multiple unrelated object hierarchies, update / insert them, introspect your schema, all in one query easily. This is very visible in benchmarks: https://www.edgedb.com/blog/why-orms-are-slow-and-getting-slower#javascript-orms-full-report https://www.edgedb.com/blog/why-orms-are-slow-and-getting-sl... And we plan to write a post about cloud benchmarks soon to further illustrate this point.