How to handle Slow Queries in MongoDB
The question is large so I guess my answer will be large too.
- Create indexes.
- Consider a better data model.
- Add more RAM so your “working set” fits in RAM.
- Use SSDs.
If you have slow operations, I would solve the issue by trying these solutions in this order.
Any idea why this would be happening?