P
Prisma5mo ago
RomainB

$queryRawUnsafe takes a long time to respond

Hi ! I have a problem with an SQL query. I'm on a MySQL database, and I'm doing a select with 5 joins via a $queryRawUnsafe, and the query takes 40 seconds. When I use mysql2 or MySQLWorkbench, it takes 4 seconds. I wanted to know if there was a reason, and if there is a way to correct this latency. prisma version: 5.15.0 MySQL version: 8.0.26
3 Replies
Yetzederixx
Yetzederixx5mo ago
5 joins is umm excessive, I don't know what's up with prisma, but on a large db (even with indexes and such) that's gonna be a suckfest of a query performance wise
jonfanz
jonfanz5mo ago
Could you try the latest version of Prisma ORM? 5.17.0. We recently included some improvements to raw querying.
RomainB
RomainBOP5mo ago
Yes, I've just tried it with version 5.17.0, and got the same result I am following up on the ticket. Do you have any idea where this might be coming from?
Want results from more Discord servers?
Add your server