Category: Database

This article documents all my findings and analysis on how much performance was improved using projection in MongoDB. At the end of this article, we will be able to know whether MongoDB query performance will be improved by leveraging projection.

Projection is “a document given to a query that specifies which fields MongoDB returns in the result set.”

The experiments I would like to perform here are: Unfortunately, the answer is no. However, the performance will improve if those returning fields are all indexed, and we will talk about this in the next section.

We can improve the query performance, and make it 250 times faster using Covered Query compared to without indexes.

Related Articles