Docs Menu
Docs Home
/
MongoDB Compass
/ /

Adjust Maximum Time for Query Operations

The MAX TIME MS query bar option sets the cumulative time limit in milliseconds to process query bar operations. If the time limit is reached before the operation completes, Compass interrupts the operation.

MaxTimeMS Option
click to enlarge

The default MAX TIME MS value is 60000, or 60 seconds. Consider raising this value if you meet one of the following conditions:

  • You have a large collection.

  • Your operations frequently time out.

  • You query data archived from the Atlas cluster using Online Archive.

You can also consider creating indexes to improve query performance.

  1. Click Options.

  2. Adjust MAX TIME MS to the desired value in milliseconds.

To learn more about MAX TIME MS, see cursor.maxTimeMS() in the MongoDB manual.

Back

Sort Returned Documents