Create, View, and Drop Indexes
You can use the Atlas CLI or the Atlas UI to manage indexes on your collections.
Indexes support the efficient execution of queries in MongoDB and should be considered for fields which your application reads often. To learn more about creating effective indexes, see Indexing Strategies.
Required Roles
To create or drop indexes, you must have access provided by at least one of the following roles:
View Indexes
From the Collections tab, you can view index information for a collection. To view index information for a collection:
Create an Index
Tip
When you create indexes, keep the ratio of reads to writes on the target collection in mind. Indexes come with a performance cost, but are more than worth the cost for frequent queries on large data sets. Before you create an index, review the documented indexing strategies.
Note
You can build full-text search with Atlas Search. Atlas Search offers fine-grained text indexing. To learn more, see Review Atlas Search Index Syntax.
Drop an Index
To drop an index from a collection through the Atlas UI:
Important
You cannot delete the _id
index. To learn more, see
Unique Indexes.
Note
Atlas CLI Limitation
You can't drop a cluster's index using the Atlas CLI.