Mongodb Indexing and Data Managing

I am working an application where million of posts data like social media and a seperate collection of like and comments . When i am applying aggregation on post collection with check of like and recent comments then query is taking time to load. I have created some indexes . How can i improve this? Please help me.

Hey @Abhishek_Arya,

Welcome to the MongoDB Community Forums and apologies for the late reply. :leaves: Have you been able to find a solution to your problem? If yes, it would be great if you can share it with the rest of the community so that anyone facing similar issues as yours can benefit from your reply. If not, and if the problem still persists, can you please provide us with the following details so as to be able to replicate the problem on our system and help you better:

  • sample documents
  • indexes that you’re currently using
  • The explain output
  • the queries that you’re running
  • current and expected output