If we empty the documents of certain type that is going to be deleted from a bucket Whether it will speedup the deletion of items. Approximately 19k documents is subjective for removal which will be around 70% of the bucket allocation
Whether it is possible to delete all 19k in one go if we nullify the documents that is going to be deleted.
Deleting a document which is empty or not doesn’t really change the speed at which deletion happens. Keep in mind that Couchbase Server is uses an Append Only storage system, so what a deletion does is just write a new revision of a document to disk which is called a tombstone. The periodic compaction process is what actually removes deleted documents later on, and eventually cleans out tombstones.
Deleting 19k documents at once should be very straight forward using something like N1QL. I’ve deleted 10x that many just running a single node test cluster on my local laptop.
Take care,
Ian McCloy (Principal Product Manager, Couchbase)