How to remove old revisions of the documents in a couchdb database?

438 Views Asked by At

I have a very large database with some GB of data. And when I try to compact it's taking me more than 12 hours. Is there any other way to delete old revisions? Does the _revs_limit help in this. I can see that the revs limit of all databases is set to 1000. Does that mean even after compaction, 1000 revisions will remain on the couchdb?

1

There are 1 best solutions below

0
Sajjitha Walallawita On

ou cannot delete an old revision of a single document. This is because the old revisions are only used by CouchDB internally for concurrency control and you shouldn't have to worry about these revisions. If you want to remove all old revisions in order to shrink the size of your database, you can run compaction.