0

I'm receiving the 100MB memory limit error for sorting against a mongodb collection with indexes.

I found a partial solution to this issue here however it does not contain information about indexed collections.

In this mongoDB documentation it states that $sort can only use allowDiskUse if "the sort operation is not supported by an index".

My question is, should I be receiving the 100MB limit error if I'm using indexing? Or is it that even with my indexing I'm still reaching the 100MB limit error?

pythonNovice
  • 1,130
  • 1
  • 14
  • 36
  • Please add your aggregation pipeline, and the index details if possible. – Charchit Kapoor Apr 27 '23 at 04:45
  • @CharchitKapoor So in my case I would like to answer a theoretical question rather than directly dealing with the code I have. Is it possible to still reach the 100MB limit error even with indexing? – pythonNovice Apr 27 '23 at 17:49
  • Depends if your pipeline is using the index, or not. Although it can reach, I doubt that your sorting is using the index. – Charchit Kapoor Apr 28 '23 at 04:26

0 Answers0