Improving Performance with Indexes in MongoDB
In this guided project, you will learn how to improve your query’s performance by indexing your MongoDB data.Login to enroll
Classes StartMay 11, 2021
MongoDB is a popular non-relational database that supports various data types, including dates and numbers.
In this guided project, you will start a MongoDB database. Then you will create a collection (a group of documents) and populate it with a large number of documents. To check the efficiency of a query, you will learn about the explain function, which tells you how long the query takes to run. Then you will choose a field to create an index on and run a query on it. By comparing the time that this query took before you added the index with the time that it took after you added the index, you will discover how efficient using an index can be.
This guided project will prepare you to improve performance when you work with big databases.
A Look at the Project Ahead
Once you have completed this project, you'll be able to:
- Measure the time it takes to execute a query with the explain function
- Describe the process of creating, listing and deleting indexes
- Evaluate the effectiveness of an index
What You’ll Need
Just a web browser!
Everything else is provided to you via the IBM Skills Network Labs environment, where you will have access to the MongoDB service that we offer as part of the IBM Skills Network Labs environment. This platform works best with current versions of Chrome, Edge, Firefox, Internet Explorer, or Safari.