Turning Learners Into Developers
Codekilla
CODEKILLA
back to course
Lesson 77 / 15749%
Indexing3/5

Create Index

Creating indexes in MongoDB transforms slow collection scans into lightning-fast lookups using db.collection.createIndex().

// index = B-tree · O(log n) lookup vs O(n) sequential scan[50 | 100][20 | 30][60 | 80][110 | 130]6572768592Click each step to walk a B-tree lookup for key 76.
Visual explanation diagram · click steps to walk through it

This lesson is Pro only.

Unlock every premium lesson and module — Pro from ₹299 / month (or ₹999 / year, saves ~₹2,589).

Sign in to unlock
// feedback.matters()
Did this lesson help you?