I have a collection (B) that is created from 2 aggregation pipelines that are run off another collection (A). When something changes in collection A, collection B needs to be updated (deletions, updates, etc).
I’ve considered a number of strategies but it seems just wiping the collection and then running aggregation again seems the easiest. It just seems maybe 1) an anti-pattern 2) messes up my storage space - the indexes seemed to retain the same size even when the collection is empty.
If I drop the collection I need to recreate the indexes which is why I tried running a deleteMany().
Feedback appreciated !