1. Does an update fsync to disk immediately?
ANS: No, writes to disk are lazy by default. A write may hit disk a couple of seconds later. For instance if the database receives a thousand increments to an object within one second, it will only be flushed to disk once.
2. How do I do transactions/locking?
ANS: MongoDB does not use traditional locking or compound transactions with rollback, as it is planned to be lightweight and fast and predictable in its performance. It can be thought of as analogous to the MySQL MyISAM auto commit model. By keeping transaction support extremely simple, performance is improved, especially in a system that may run across many servers.
3. What makes MongoDB best? ANS: Following features of MongoDB make it best …show more content…
If you remove an object attribute, is it deleted from the database ANS: Yes, it is deleted. Remove the attribute and then re-save() the object.
9. How can we move the old file in the moveChunk directory?
ANS: Yes, of course, to move the old file in the moveChunk directory at the time of shard balancing operations these files are made as backups and can be removed once the operation are done.
10. Explain this situation, if an index does not fit into RAM?
ANS: when an index is too big size fit into RAM, then MongoDB read the index from disk, which provide slower operation than reading from RAM. If keep in mind an index fits into RAM when your server has RAM present for the index combined with the rest of the working set.
11. Procedure of MongoDB provide concurrency?
ANS: MongoDB uses reader-writer locks that allow concurrent readers shared access to a resource, such as a database or collection, but give exclusive access to a single write operation.
12. Why MongoDB is not preferred over a 32-bit system?
ANS: When running a 32-bit build of MongoDB, the total storage size for the server, including data and indexes, is 2 GB. For this, do not deploy MongoDB to production on 32-bit