Question

I know we can configure the storage engine to be wiredTiger at instance level when we start mongod.

But can we also select the storage engine to be different for different collection or database?

Was it helpful?

Solution

You can only use a single storage engine type per mongod instance. There is only a single dbPath setting for a mongod deployment, and you cannot mix & match data files from different storage engines within the same data path.

However, you can use different storage engine configurations within members of a replica set (for example, mmap primary and WiredTiger secondaries). If you do this, you should be wary of differences in performance and be sure to test thoroughly in a QA/staging environment with representative workload.

Another available option is to set storage-engine specific options when creating a collection. For example, you could override the instance-level defaults for WiredTiger and set different options for specific collections (i.e. higher level of compression, or perhaps no compression).

Licensed under: CC-BY-SA with attribution
Not affiliated with dba.stackexchange
scroll top