Docs Menu
Docs Home
/
MongoDB Atlas
/ /

Auto-Create Indexes for Serverless Instances

On this page

  • How Auto-Index Creation Works
  • Enable or Disable Auto-Index Creation
  • Review Automatically Created Indexes
  • Drop Automatically Created Indexes

Atlas can automatically create indexes for your serverless instance to improve query performance.

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.

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.

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.

To enable auto-index creation for your serverless instance with the Atlas UI:

1
  1. In the left navigation, click Database.

  2. Click the name of the serverless instance.

  3. Click the Performance Advisor tab.

2

Once you enable auto-index creation, Atlas begins to automatically create any suggested high-impact indexes.

To disable auto-index creation for your serverless instance with the Atlas UI:

1
  1. In the left navigation, click Database.

  2. Click the name of the serverless instance.

  3. Click the Performance Advisor tab.

2

After you disable auto-index creation, Atlas stops automatically creating any suggested high-impact 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.

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.

← Configure Serverless Instance Backup