You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+22-1Lines changed: 22 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1414,7 +1414,28 @@ MMAPv1 is a B-tree based system which powers many of the functions such as stora
1414
1414
<b><a href="#">↥ back to top</a></b>
1415
1415
</div>
1416
1416
1417
-
#### Q. ***How to condense large volumes of data in Mongo?***
1417
+
## Q. ***How to condense large volumes of data in Mongodb?***
1418
+
1419
+
**compact**
1420
+
1421
+
Rewrites and defragments all data and indexes in a collection. On `WiredTiger` databases, this command will release unneeded disk space to the operating system. This command will perform a compaction "in-line".
1422
+
1423
+
MongoDB compresses the files by:
1424
+
1425
+
* copying the files to a new location
1426
+
* looping through the documents and re-ordering / re-solving them
1427
+
* replacing the original files with the new files
1428
+
1429
+
**Syntax**
1430
+
1431
+
```js
1432
+
{ compact:<collection name> }
1433
+
```
1434
+
1435
+
<div align="right">
1436
+
<b><a href="#">↥ back to top</a></b>
1437
+
</div>
1438
+
1418
1439
#### Q. ***Is it possible to update MongoDB field using value of another field?***
1419
1440
#### Q. ***How to check if a field contains a substring?***
1420
1441
#### Q. ***How to find document with array that contains a specific value?***
0 commit comments