Auto-Create Indexes for Serverless Instances
On this page
Atlas can automatically create indexes for your serverless instance to improve query performance.
How Auto-Index Creation Works
Auto-index creation prioritizes creating indexes with the highest Impact score. Atlas defines impact as the estimated performance improvement that the index would bring.
To learn more about the Impact score and how the Performance Advisor ranks indexes, see Review Index Ranking.
Atlas can auto-create up to four indexes per collection in your serverless instance.
Auto-Index Creation Frequency
If auto-index creation is enabled, Atlas checks once per hour for slow queries on your serverless instance. If there are at least 50 slow queries logged in the last hour, Atlas creates one new index at a time if both of the following criteria are met:
Atlas finds high-impact index suggestions.
Atlas determines that building a new index won't negatively affect the performance of the serverless instance. When determining performance impact, Atlas checks concurrent index builds, CPU, memory, and other factors.
Enable or Disable Auto-Index Creation
Atlas enables auto-indexing for serverless instances by default. You can manually disable or re-enable auto-index creation with the Atlas UI. If enabled, auto-index creation applies to all collections in the serverless instance.
Enable Auto-Index Creation
To enable auto-index creation for your serverless instance with the Atlas UI:
Once you enable auto-index creation, Atlas begins to automatically create any suggested high-impact indexes.
Disable Auto-Index Creation
To disable auto-index creation for your serverless instance with the Atlas UI:
After you disable auto-index creation, Atlas stops automatically creating any suggested high-impact indexes.
Review Automatically Created Indexes
Atlas sends an email alert when it creates an index automatically. You can view automatically created indexes from the Atlas UI Indexes view. The Atlas UI shows automatically created indexes with the Auto-Created property.
Drop Automatically Created Indexes
You can drop auto-created indexes as you would any other index. To drop an auto-created index, click Drop Index. If you drop an auto-created index, auto-index creation doesn't recreate that index. Performance Advisor might still recommend that index.