-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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] Performance issue in findMany()
query execution with in
#15983
Comments
@ayush-cbh Do you see the same problem with a more recent version of Prisma? If you could try >4 that would be interesting, the latest is |
findMany()
query execution
@ayush-cbh It's been a while, but can you maybe provide both the aggregation you run manually in MongoDB compass and the command that Prisma generates? If those are identical, then this would mean this is not a case of the same issues that Paul linked to above and mean that we have to treat this problem separately. Thanks. |
findMany()
query executionfindMany()
query execution with in
This performance problem is fixed in Prisma 5.14.0 |
Bug description
I have a nextJS project and I am using Prisma as an ORM for mongoDB.
I need to execute findMany for a collection having 1 million documents.
Performance change:
When I try to execute the same aggregation in mongoDB compass it takes less than 0.5 sec
while with prisma it takes around 20 sec to get the result.
How to reproduce
Create a collection with 1 million documents.
Search 5 document through id with the help of findMany()
It will take around 20 sec to execute the aggregation.
Expected behavior
It should return asked documents in (0.5 - 1 ) sec.
Prisma information
Environment & setup
Prisma Version
The text was updated successfully, but these errors were encountered: