O'Reilly logo

MongoDB in Action, Second Edition: Covers MongoDB version 3.0 by Peter Bakkum Kyle Banker Shaun Verch, Douglas Garrett, and Tim Hawkins

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 8. Indexing and query optimization

This chapter covers

  • Basic indexing concepts and theory
  • Practical advice for managing indexes
  • Using compound indexes for more complex queries
  • Optimizing queries
  • All the MongoDB indexing options

Indexes are enormously important. With the right indexes in place, MongoDB can use its hardware efficiently and serve your application’s queries quickly. But the wrong indexes produce the opposite result: slow queries, slow writes, and poorly utilized hardware. It stands to reason that anyone wanting to use MongoDB effectively must understand indexing.

But for many developers, indexes are a topic shrouded in mystery. This need not be the case. Once you’ve finished this chapter, you should have a good ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required