4 ms·
This. I can’t live without Prisma anymore.
by ed_mercer 3y ago
This. I can’t live without Prisma anymore.
- joegibbs 3y agoI do like Prisma, but I find that for quite a few queries it's ridiculously inefficient - things like getting counts, or where you have to get 20 of some model with a bunch of relations - that I find myself using a lot of queryRaw calls. Apparently this is because it doesn't use joins at all, it's all done sequentially. For some of the stuff where I'm getting counts grouped by month it goes down from 20+ seconds to under 200ms using raw SQL.
- alexanderchr 3y agoWow, had no idea but it's madness that they don't use joins. I think it says a lot about the state of our industry that an ORM can get so popular in 2024 without leveraging such an essential SQL feature. I mean, Entity Framework had this covered 15 years ago... But it's not cool i guess. Looks like there's preview support for joins now, so at least they are getting there...