> For the complete MongoDB documentation index, see www.mongodb.com/docs/llms.txt

# Adjust Maximum Time for Query Operations

MongoDB Compass Readonly Edition will be deprecated in a future release. To replicate the read-only behavior in a standard Compass edition, assign users [`read`](https://www.mongodb.com/docs/manual/reference/built-in-roles.md#mongodb-authrole-read) access at the database level and enable the [readOnly](https://www.mongodb.com/docs/compass/settings/read-only.md#std-label-compass-read-only) option in Compass.

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](/images/compass/max-time-ms.svg)

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.](https://www.mongodb.com/docs/manual/reference/limits/#data)

- Your operations frequently time out.

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

You can also consider creating [indexes](https://www.mongodb.com/docs/compass/indexes.md#std-label-compass-indexes) to improve query performance.

## Set MAX TIME MS

1. Click Options.

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

## Learn More

To learn more about MAX TIME MS, see [cursor.maxTimeMS()](https://www.mongodb.com/docs/manual/reference/method/cursor.maxTimeMS/) in the MongoDB manual.
