MongoDB Indexing in Practice
An article based on Kyle Banker’s MongoDB in Action:
Indexes are enormously important. With the right indexes in place, MongoDB can use its hardware efficiently and serve your application’s queries quickly. With the wrong indexes, you’ll see the exact opposite effect: slow queries and poorly utilized hardware. It stands to reason, then, that anyone wanting to use MongoDB effectively and make the best use of hardware resources must understand indexing. We’re going to look at some refinements on the kinds of indexes that can be created in MongoDB. We’ll then proceed to some of the niceties of administering those indexes.
While pretty detailed, the part I haven’t seen mentioned in this article is that MongoDB indexes are stored using memory mapped files (same mechanism as for storing data). Basically this means that your data and all your indexes are all competing for your system memory.
Original title and link: MongoDB Indexing in Practice (©myNoSQL)
via: http://www.cloudcomputingdevelopment.net/mongodb-indexing-in-practice/