Summary
Mongoid relies a lot on MongoDB for performance. We leverage the features of MongoDB, such as MapReduce and the aggregation framework, that give us a huge performance boost. Indexing is the easiest and ideal means of ensuring that our queries are fast.
Performance tuning is a continuous process, and we should keep monitoring our servers and databases to find and optimize slow queries.
In the next chapter, we shall see the different modules and gems that are supported, which give our application additional functionality as well as make our life easier.