MongoDB Indexes
Learn how to improve MongoDB performance by learning how to create single, compound, and multikey indexes as well as how to delete indexes.
MongoDB Indexes
Unit Overview
In this unit, you will learn about indexes, how indexes support the efficient execution of queries in MongoDB, the trade-offs associated with using indexes, how to create Single Field and Compound Index, what Multikey indexes are, and how to see if queries are using indexes. Finally, you will learn how to delete an index.
Prerequisites
- Getting Started with MongoDB Atlas
- MongoDB and the Document Model
- Connecting to a MongoDB Database
- MongoDB CRUD Operations: Insert and Find
- MongoDB CRUD Operations: Replace and Delete
- MongoDB CRUD Operations: Modifying Query Results
- MongoDB Aggregation
Lessons in this Unit
- Lesson 1 – Using MongoDB Indexes in Collections
- Lesson 2 – Creating a Single Field Index in MongoDB
- Lesson 3 – Creating a Multikey Index in MongoDB
- Lesson 4 – Working with Compound Indexes in MongoDB
- Lesson 5 – Deleting MongoDB Indexes
-
01.
-
02.Lesson 2: Creating a Single Field Index in MongoDB
- Learn
- Practice
-
03.Lesson 3: Creating a Multikey Index in MongoDB
- Learn
- Practice
-
04.Lesson 4: Working with Compound Indexes in MongoDB
- Learn
- Practice
-
05.Lesson 5: Deleting MongoDB Indexes
- Learn
- Practice
-
06.Conclusion
- Learn

John McCambridge I University Curriculum Engineer
John is a Curriculum Engineer on the University team at MongoDB. Before his work as a Curriculum Engineer, he was an instructor and teaching assistant for coding boot camps at UT (Austin), and UCLA. Additionally, he worked as a QA engineer for a startup called Coder and spent five years at Apple Inc. John is a passionate software engineer and eductor who enjoys taking complex topics and making them digestible for the community.

Laura Gutierrez Munoz I Senior Curriculum Developer
Laura Gutierrez is a computer scientist working as a MongoDB Senior curriculum developer based in Madrid (Spain) with 10+ years of experience in data modeling and data analytics.

Daniel Curran | Senior Curriculum Designer
Daniel is a Senior Curriculum Designer at MongoDB. Before joining MongoDB, he worked as an Instructional Designer and Content Developer specializing in technical content for a host of international clients. Daniel's goal is to remove obstacles so learners can feel confident on their journey to become masters of MongoDB.