an aggregation stage to load data to DRAM for the fields that are only requested
When we use $project stage, it loads whole document from disk to memory (if not in working set). Because of this, When we create a data model, We have to create separate collection if the field is not required in frequent access of data. Creating a view is an option, but what if $project itself or $project with some argument in it, or a new pipeline stage or operator gets introduced which fetches the data from disk only for the fields specified instead of loading whole document.
With memory mapped file, retrieving fields specified alone would not be simply possible but just thinking of a possibility which can be really useful in a case.
1
vote
Viraj
shared this idea