Back to Catalog

Improving Performance with Indexes in MongoDB

IntermediateGuided Project

In this guided project, you will learn how to improve your query’s performance by indexing your MongoDB data.

4.3 (22 Reviews)

Language

  • English

Topic

  • Database

Enrollment Count

  • 187

Skills You Will Learn

  • MongoDB

Offered By

  • IBM

Estimated Effort

  • 30 minutes

Platform

  • SkillsNetwork

Last Update

  • May 1, 2024
About This Guided Project
Discover how to save time in executing a query by indexing your MongoDB data. Indexes are data structures that store entries in order. Ordering supports efficient matching and querying based on ranges.

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.

Your Instructor
Ramesh Sannareddy

Instructors

Ramesh Sannareddy

Corporate IT Trainer

Ramesh Sannareddy holds a Bachelors Degree in Information Systems (Birla Institute of Technology, Pilani). He has two and a half decades of experience in Information Technology Infrastructure Management, Database Administration, Information Integration and Automation. He worked for companies like Intergraph, Genpact, HCL, and Microsoft. Currently, he is a freelancer and pursues his passion for teaching. He teaches Data Science, Machine Learning, Programming and Databases.

Read more