O'Reilly logo

Seven Databases in Seven Weeks by Jim R. Wilson, Eric Redmond

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

Day 2: Indexing, Grouping, Mapreduce

Increasing MongoDB’s query performance is the first item on today’s docket, followed by some more powerful and complex grouped queries. Finally, we’ll round out the day with some data analysis using mapreduce, similar to what we did with Riak.

Indexing: When Fast Isn’t Fast Enough

One of Mongo’s useful built-in features is indexing to increase query performance—something, as we’ve seen, that’s not available on all NoSQL databases. MongoDB provides several of the best data structures for indexing, such as the classic B-tree, and other additions such as two-dimensional and spherical GeoSpatial indexes.

For now we’re going to do a little experiment to see the power of MongoDB’s B-tree index by populating ...

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