This version will reach end of life on Feb 2018. To upgrade, go to the Learn more about upgrading your version of MongoDB.



Constrains the query to only scan the specified number of documents when fulfilling the query. Use one of the following forms:

db.collection.find( { <query> } )._addSpecial( "$maxScan" , <number> )
db.collection.find( { $query: { <query> }, $maxScan: <number> } )

Use this modifier to prevent potentially long running queries from disrupting performance by scanning through too much data.

←   $hint $maxTimeMS  →