Slow query with many-to-one relationship on MongoDB #20600
Labels
bug/1-unconfirmed
Bug should have enough information for reproduction, but confirmation has not happened yet.
kind/bug
A reported bug.
team/client
Issue for team Client.
topic: findMany()
topic: include
topic: mongodb
topic: performance/queries
topic: performance
topic: prisma-client
Milestone
Problem
Server environment:
OS : Ubuntu 22
Hardware : vCpu 4core, 8GB RAM
Prisma version : ^5.0.0
I have 8million documents on VideoChatting collection.
Following code always call COLLSCAN, so the cpu usage reached 100%. and the solution code has provided
[Logs]
Suggested solution
Use aggregateRaw. but it maybe critical on your DX
The text was updated successfully, but these errors were encountered: