What will happen when you remove a document from database in mongodb? Does mongodb remove it from disk?
Answer / Deep Kumar
When you delete a document from MongoDB, the document is marked as deleted and moved to a special collection named `.trash`. The space occupied by the deleted document is not immediately reclaimed. However, the deleted document remains on disk until garbage collection runs, which helps ensure data integrity and recoverability. In some configurations, you can also set up tiered storage or change journaling options to optimize for disk usage.
| Is This Answer Correct ? | 0 Yes | 0 No |
Which are the storage engines used by mongodb?
List the important features of mongodb.
What's new in mongodb 3.2?
Who are mongodb competitors?
Can we use jpa with mongodb?
What is mongoose odm?
Which is better firebase or mongodb?
What is the role of 8 analysers in mongodb?
Is it possible to remove old files in the movechunk directory?
What is index and how it is used in mongodb?
Is mongodb good for big data?
How to retrieve data from mongodb using java?
Oracle (3253)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)