Performance Advisor

The Performance Advisor monitors queries that MongoDB considers slow and suggests new indexes to improve query performance. The Performance Advisor recognizes a query as slow if it takes longer than 100 milliseconds to execute.

Recommended indexes are accompanied by sample queries, grouped by query shape, that were run against a collection that would benefit from the suggested index. The Performance Advisor is always enabled and does not negatively affect the performance of your Atlas clusters.


To view field values in a sample query in the Performance Advisor, you must be a user with at least one of the following access:

Users without the aforementioned access cannot see the field values.


Indexes improve read performance, but a large number of indexes can negatively impact write performance since indexes must be updated during writes. It is important to consider this tradeoff when deciding whether to create new indexes for a collection that already has several. Examine whether a query for such a collection can be modified to take advantage of existing indexes, as well as whether a query occurs often enough to justify the cost of a new index.


The following limitations apply to indexes and log sizes.


The Performance Advisor cannot suggest indexes for MongoDB databases configured to use the ctime timestamp format. As a workaround, set the timestamp format for such databases to either iso8601-utc or iso8601-local.

Log Size

The Performance Advisor analyzes up to the first of the following limits:

  • the most recent 20,000 slow queries OR
  • the most recent 10MB of logs

Understanding the Query Inefficiency Score

The Performance Advisor displays sample queries with recommended indexes. Each sample query includes a query inefficiency score, which is how many documents were read for every document returned by the query. A score of 1 represents a very efficient query because every document read matched the query and was returned with the query results. The Performance Advisor displays a warning icon next to any score over 1,000, which represent highly inefficient queries. All suggested indexes represent an opportunity to improve query performance.

Enable or Disable Performance Advisor for a Project

Required Privileges

To enable or disable Performance Advisor for a project, you must have the Project Owner role for the project.

Performance Advisor is enabled by default. To disable or enable Performance Advisor:


Click Settings.


Toggle the button next to Performance Advisor.

Access Performance Advisor

To access the Performance Advisor:


Click Clusters.


Click the replica set where the collection resides.

If the replica set resides in a sharded cluster, first click the sharded cluster containing the replica set.


Click Performance Advisor.


Select a collection from TOP COLLECTIONS.


Select the time period from the list box for which you want to view data.

The Performance Advisor displays up to 20 query shapes across all collections in the cluster and suggested indexes for those shapes.


The Performance Advisor collects existing indexes for collections with slow queries every six hours. However, the Performance Advisor generates indexes based on actual queries within five minutes of query execution. It is possible to see suggestions for indexes that you have already created, but these are removed the next time that the Performance Advisor collects indexes.