You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by Carl-Clemens Ebinger <po...@ebinger.cc> on 2021/09/14 15:24:38 UTC

Question on Implementation of purge.

Hello list,

I'm interestested to know how the purge-function works.

Is a read-operation of the whole database necessary, and afterwards an
rewrite of all data which is not deleted?

How efficient is the purge-Operation?

Best,
Carl-Clemens Ebinger


Re: Question on Implementation of purge.

Posted by Peng Hui Jiang <ji...@cn.ibm.com>.
Hi Carl,

Thanks for your interest on purge functionality in CouchDB.

The _purge endpoint allows operators to specify the document ID and its 
revision to be purged. In the request, multiple documents can be 
specified. So it is not necessary to read through the whole database 
because the documents to be purged can be located directly. Furthermore, 
they can be purged/permanently deleted from database. It should be 
mentioned as well that beside document, its secondary index, and other 
stuff will be also deleted. However, these are aysnc-ed.

Regarding the performance or efficiency, it is not worse than the whole 
database scan. Normally, it just depends on the deletion of documents in 
database.

For more details, you may want to read below.

https://docs.couchdb.org/en/main/cluster/purging.html#clustered-purge
https://docs.couchdb.org/en/main/api/database/misc.html#post--db-_purge

Best,
Peng Hui Jiang




From:   "Carl-Clemens Ebinger" <po...@ebinger.cc>
To:     dev@couchdb.apache.org
Date:   2021/09/14 11:25 PM
Subject:        [EXTERNAL] Question on Implementation of purge.



Hello list,

I'm interestested to know how the purge-function works.

Is a read-operation of the whole database necessary, and afterwards an
rewrite of all data which is not deleted?

How efficient is the purge-Operation?

Best,
Carl-Clemens Ebinger