I have a scenario where most of the documents i want to delete are in a collection called "expired". I do not want to overload my servers by running a long running process which would iterate over documents and delete them one by one i would rather do them in batch size using document-delete.
So my question is how does xdmp:collection-delete work ?
Does it iterate over documents and delete them ?
or
Does it do something like DROP Table in SQL and its "instantaneous" ?
I want to know what is the background process for xdmp:collection-delete. I wonder if anyone can draw the flow of how this function handles document for deletion as i want to understand the process in more depth than just overview of what it does.