FETCH
Short Description
Retrieving documents
Detailed Description​
In MongoDB explain plans, FETCH is an execution stage that means MongoDB is retrieving the full documents from disk or memory after using an index to find the relevant document locations.
In simple terms:
- FETCHÂ happens after MongoDB uses an index to identify which documents are relevant.
- At this stage, MongoDB “fetches” the actual documents so it can check other fields, apply additional filters, or prepare the final output (like projections or sorts that require actual data).
Example:
If your query can’t get all the necessary data just from the index (for example, your projection requests a field not covered by the index), MongoDB uses FETCH to load the documents.
Summary:
FETCH means MongoDB is looking up and loading the documents that matched an index scan in order to finish processing your query.
Additional Links​
Search online​
If this article doesn't have the information you need you can try searching online. Remember, you can contribute suggestions to this page.