Is there an option to turn off the dataloader query optimization?

We recently ran into an issue where the dataloader (described here: 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:
Eric Allam — ☀️/ (@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
Eric ✨
Yea that's me 🫡 Just added a comment to your issue 👍