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
Jan Piotrowski (janpio)
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.
Jan Piotrowski (janpio)
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"
From An unknown user
Twitter
Eric ✨ trigger.dev
Yea that's me 🫡 Just added a comment to your issue 👍