Thanks for your responses Chris, Gregory and Steeve.
I didn’t think it would be the best thing for Mongo to cache the entire index, but I needed to ask. The reason I asked this question was based on the following recommendation:
Mongo recommends to “Ensure Indexes Fit in RAM”
https://www.mongodb.com/docs/manual/tutorial/ensure-indexes-fit-ram/#std-label-indexes-ensure-indexes-fit-ram
If only parts of the index are used, then I don’t think it is necessary to have enough RAM to hold the entire index just the index pages frequently used.
Also, I am glad to hear that Mongo will will prioritize keeping index pages cached.
John
1 Like