nosql - MongoDB Compass Update fails with - Stack Overflow

admin2025-04-25  2

I'm using Mongo's Update functionality to flip a simple flag from 25 records matching a specific criteria. The database contains 50 million records.

Matching criteria:

{ 'profile_merge.success': false, 'profile_merge.http_status': 500 }

Update statement:

{
   "$set":{
      "profile_merge.processed":false
   }
}

This fails with the message: "error while multiplanner was selecting best plan :: caused by :: operation exceeded time limit" (see screenshot attached). The message appears immediately, so it does not seem to be hitting any time limit.

I'm using Mongo's Update functionality to flip a simple flag from 25 records matching a specific criteria. The database contains 50 million records.

Matching criteria:

{ 'profile_merge.success': false, 'profile_merge.http_status': 500 }

Update statement:

{
   "$set":{
      "profile_merge.processed":false
   }
}

This fails with the message: "error while multiplanner was selecting best plan :: caused by :: operation exceeded time limit" (see screenshot attached). The message appears immediately, so it does not seem to be hitting any time limit.

Share Improve this question asked Jan 16 at 13:04 kms333kms333 3,2678 gold badges35 silver badges45 bronze badges 2
  • I've tried to create indexes and modify the update query but nothing works. – kms333 Commented Jan 16 at 13:15
  • Did you try the mongo shell mongosh? – Wernfried Domscheit Commented Jan 16 at 13:22
Add a comment  | 

1 Answer 1

Reset to default 0

The error comes from the multiplanner - the query planner on the serverside (mongodb) not clinetside (compass).

Query planner has very tight deadline counted in milliseconds - for your eyes it would seem immediate, but there was a lot of drama happened on the server during this fraction of a second. The query planner got all possible combinations of query optimisation, ran all of them for a short time, calculated how many results each plan returned to pick the best one.

The error spells that all plans failed to return at least 1 result, and the engine refused to run the query.

转载请注明原文地址:http://anycun.com/QandA/1745531126a90837.html