Reputation: 23
Say I have a database with 100 records, each with 1000 revisions, and an additional 100,000 deleted documents each with an extensive history of revisions. In addition we also have a view document and some mango indexes.
For this hypothetical situation let's assume I can't delete and rebuild the database. Also replication safety is not a concern.
If I am required to create some kind of script utilizing curl to purge the database of all unused data so that the result of running this script is exactly the same as deleting and rebuilding the database with only 100 records with a single revision on-file, how should I go about doing this?
Upvotes: 0
Views: 407
Reputation: 1019
For your hypothetical situation, you could do the following:
A safer approach for saving disk space and BTree size in a real-life scenario would be:
Upvotes: 1