yes i did this query
yes i did this query
with prism findmany and selects it takes me 5 seconds and I changed it to using $queryRaw and it takes me 2 seconds which seems like quite a difference to me
6 Replies
I would bet the query produced from
findMany
and count
are going to be different than the one you're doing with queryRaw
- unless you're doing the exact same one?
Prisma often does multiple queries when you do findMany
and other operations too, which you're likely avoiding with a raw query
It does this to improve DX with it's nice to use wrappers and APIs, but there's always a tradeoff with speed vs raw performance with an ORM
https://orm.drizzle.team/ is about as close as you'll get to raw queries with some of the creature comforts of an ORM, but not quite as ergonomic as something like PrismaIs that the exact query that
findMany
is doing?yep
do you recomend to use drizzle instead of prisma? is more faster?
You could try it. You'll always going to add some overhead with any ORM
Yes I know, but I wouldn't think it would be that much, it's double and it seems too much for my taste.