Is there an option to turn off the dataloader query optimization?
We recently ran into an issue where the dataloader (described here: https://www.prisma.io/docs/orm/prisma-client/queries/query-optimization-performance) caused queries to be constructed in a way that were extremely inefficient, when combined with a count of a relation. Is there any way to turn this functionality off?
4 Replies
Not yet, but I have recorded the same request myself in the past: https://github.com/prisma/prisma/issues/23730
Can you share more - or even better create an issue - about the problems you are getting into because of the data loader / query batching? That would be super interesting for us to know about.
Found this, which seems to be the same situation: https://x.com/maverickdotdev/status/1800180750572236801
Eric Allam — ☀️/trigger.dev (@maverickdotdev) on X
@sorenbs @prisma The top query is using a single ID with =, and the bottom one is 3 IDs with an "IN"
Twitter
Yea that's me 🫡
Just added a comment to your issue 👍