MongoDB Performance & Scalability - Schema Design Is More Important Than Anything Else


The first Mongo Days conference I attended was MongoSV 2011. I chose to attend "Schema Design at Scale", a presentation by Eliot Horowitz. The first slide was titled "Schema", and had a list of reasons to know MongoDB schema best practices:

Schema is the...

Eliot accompanied the slide by saying:

Schema design is ... the largest factor when it comes to performance and scalability ... more important than hardware, how you shard, or anything else, schema is by far the most important thing.

The presentation walks through things to consider when designing your schema. For anyone new to Mongo or hitting performance issues, please watch the presentation, it will improve your experience with Mongo.

The main topics are...

02:13 – Embedding documents: how to think about embedding documents 10:00 – Index design Overview 11:00 – Right Balanced Indexes: limit the required RAM by optimizing your indexes 13:18 – Covered Indexes: include fields in index to the requested fields, and only hit indexes 15:44 – Sharding: "at some point you are going to have to scale, and that means sharding" 17:25 – Shard key: "choosing a shard key is easy in the beginning, but hard to change later." 21:27 – Justin Bieber tweet reference

Watch the full presentation

MongoDB Performance Toolset

At MongoHQ, we take performance seriously, and have built an amazing stack of optimizing your database's performance:

Chris Winslett
Chris Winslett is a complex arrangement of Oxygen, Carbon and Hydrogen. Includes some salt. And beer. Love this article? Head over to Chris Winslett’s author page to keep reading.

Conquer the Data Layer

Spend your time developing apps, not managing databases.