File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -135,6 +135,23 @@ in RAM, MongoDB serves all queries from memory.
135
135
MongoDB does not implement a query cache: MongoDB serves all queries
136
136
directly from the indexes and/or data files.
137
137
138
+ Does MongoDB require a separate object-caching layer?
139
+ -----------------------------------------------------
140
+
141
+ No. MongoDB integrates databases with object caches such that an
142
+ object's representation in the database is very close to its
143
+ representation in memory. Retrieval from RAM is a far less expensive
144
+ operation for MongoDB than it is for a traditional RDMS. For an RDMS, a
145
+ high expense is incurred when data must be transformed into an object
146
+ representation when transferred to RAM.
147
+
148
+ Additionally, MongoDB's integration of databases with memory means there
149
+ is no risk of retrieving stale data from the cache.
150
+
151
+ Keep in mind, though, that in MongoDB retrieving from RAM is always
152
+ faster than from disk, and it is best to have enough memory to fit all
153
+ of your working data set.
154
+
138
155
What language is MongoDB written in?
139
156
------------------------------------
140
157
You can’t perform that action at this time.
0 commit comments