InterviewSolution
| 1. |
{ d : 1, a: 1 , b:1} { p : 1, q : 1, r : 1, s : 1, t : 1 } { x : 1 } { c : 1, y : 1 } { c : 1, d : 1 } |
|
Answer» The storage engine is the component that lies between the database and storage layer and is primarily responsible for managing data. MongoDB PROVIDES few choices of storage engines, enabling us to use best suited for our applications. Choosing the appropriate storage engine can significantly impact performance.
WiredTiger replaced MMAPV1 in 3.2 to become default storage engine. If we install MongoDB and do not specify any storage engine, wiredTiger is enabled. As it provides a document-level concurrency model, checkpointing, and compression it is suited for most WORKLOADS. It also supports encryption at rest in MongoDB Enterprise.
Various applications REQUIRE predictable latencies which can be achieved by storing the documents in memory rather than on disk. In-Memory Storage Engine is helpful for such applications. It is available only in MongoDB enterprise edition.
MongoDB started with MMAPv1 storage engine only but it was successful for a specific SUBSET of use cases only due to which it is deprecated from version 4.0. |
|