Skip to main content
All CollectionsAtlas Frequently Asked Questions
Auto-Indexing for M0 to M5 Clusters
Auto-Indexing for M0 to M5 Clusters

Why we're automatically applying indexes to M0, M2, and M5 clusters in Atlas to improve performance

Joao Boesso avatar
Written by Joao Boesso
Updated over 5 years ago

We recently enabled "automatic indexing" for M0, M2, and M5 Atlas clusters.

Why did we do this? 

Inefficient queries are often the root cause of database performance issues. They may have high operation execution times and put undue load on a database's server. 

Often, the easiest way to make queries run more efficiently is to create an index. Previously this action required proactive monitoring of the database and manual creation of indexes. We wanted to make it easier for Atlas users to address inefficient indexes without spending time on upfront research ("which indexes do I need?"), index creation, and then further optimizations.

What did we build?

Atlas already has an automated system that proactively monitors your database and identifies opportunities to improve performance. We extended this functionality by enabling Atlas to 1) determine what the best index is for your particular situation and 2) apply that index to the database.

This should result in a dramatic decrease in query latency.

In the example above, auto-indexing was applied at 4:00am, which led to a 4x decrease in latency! To see how an index has improved query efficiency for your cluster, visit the Metrics page.

What's Next?

Currently, we are only applying automatic indexes to M0, M2, and M5 clusters that do not have any indexes. In other words, if you already have an index created, we will not generate and apply more indexes for you. And you are free to create as many indexes as you want.

In future iterations of auto-indexing, we will be adding support for creating multiple indexes, and extending the auto-indexing feature to clusters on other Atlas tiers. We hope this new feature will make it even easier for you to run efficient operational workloads and diagnose performance issues.

Did this answer your question?