Yep, I thought about that, but unless I do some tests first, I have no idea how long such a process will take for, say, 10K out of 1M docs and what impact on performance it will have during that time. As the option 'Compact database' is no longer available, I am also not aware how exactly to do that. Replication? Not feasible in prod environment, I'm afradi.
Otherwise, yes, the option to have customer ID as doc _id, instead of UUID is absolutely valid. Thanks. On 4/8/2021 2:56 PM, Olaf Krueger wrote: > Hi, > >> ... I will be required to be able to delete all data for a departing >> customer.... > Wouldn't it be a valid option to remove all documents which are related to a > particular customer from a single database and (if needed) re-create the > database afterwards in order to get rid of the revisions or "tombstones"? > > Using meaningful _ids instead of anonymous uuids could be helpful here, e.g. > > customer:1 > customer:1.address > customer.1.meeting.1.scheduling > customer.1.meeting.1.result > customer.1.meeting.2.result > > customer:2 > customer:2.address > customer.2.meeting.1.scheduling > customer.2.meeting.1.result > customer.2.meeting.2.result > > By using the leading string of the _id, e.g. "customer:1", you could fetch or > delete all relations for a particular customer. > Moreover, with the knowledge of the customer-id and meeting-id, you can > easily compose the _id of each document in order to directly fetch it by its > _id. > > Maybe this helps, > > Olaf > > > > > > > > > >
