-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MongoDB Query with 'in' condition will cause COLLSCAN, without leveraging indexes #19955
Comments
Hi @yufangOPUS, thank you for your report. Could you please show us an example of a |
Hi @jkomyno , just a simple findMany with in condition will cause this issue. Please try it out , more details in #12793 (comment) |
Is this a duplicate of #12793 then? Is something about your issue here different? |
This performance problem is fixed in Prisma 5.14.0 |
Bug description
how to reproduce this issue:
const result = await this.prisma.ANY_COLLECTION.updateMany({ where: { id: { in: idsToUpdate, }, }, })
And it will cause a COLLSCAN, even the field already has index. It's getting really bad performance on our production database and no other way to fix this.
I have seen a lot of similar issue for several months just like #14871 and #12793
Why is this fatal bug still not fixed after months? If prisma is abandoning support for mongodb, please let us know. We'll migrate to other ORM as soon as we can.
How to reproduce
Expected behavior
No response
Prisma information
// Add your schema.prisma
// Add your code using Prisma Client
Environment & setup
Prisma Version
The text was updated successfully, but these errors were encountered: