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?
Solution:Jump to 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...
GitHub
Support new relation load strategy for SQLite (
relationJoins
prev...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...
3 Replies
You selected the carefully hand-crafted route. A dev artisan will respond soon. Meanwhile, the
#ask-ai
channel awaits if you're curious!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
GitHub
Support new relation load strategy for SQLite (
relationJoins
prev...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...
Glad to hear that this is resolved. Thanks for marking the solution 🙏