Easiest way to investigate a slow Prisma D1 query?
I have an instance of Prisma that I'm using to run a query.
The code consistently takes 200 - 250ms to run. On the D1 dashboard the query time is 0.4ms.
I would like to understand where that extra time is coming from (serializing the result, waiting on the d1 api, etc)
What's the easiest way to do that with this one query?
The code consistently takes 200 - 250ms to run. On the D1 dashboard the query time is 0.4ms.
I would like to understand where that extra time is coming from (serializing the result, waiting on the d1 api, etc)
What's the easiest way to do that with this one query?
Solution
ah, I found the issue. Each query is taking 70ms and prisma is generating 3 queries and sending them in series!
https://github.com/prisma/prisma/issues/23348
https://github.com/prisma/prisma/issues/23348
GitHub
In versions 5.7.0 and 5.10.0 we released support for a new relation load strategy for PostgreSQL and MySQL as part of the relationJoins preview feature: Documentation: https://www.prisma.io/docs/or...