-
Type:
Improvement
-
Resolution: Duplicate
-
Priority:
Major - P3
-
None
-
Affects Version/s: 8.3.0-rc0
-
Component/s: None
-
None
-
Storage Execution
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Today in MongoDB it's not possible to truncate a user-created collection because collections created by users will always include at least one index.
This means customers who want to keep the collection but remove all the documents must either follow a drop-and-recreate pattern which can be expensive for sharded collections (metadata refresh) and requires the customer to recreate their chunk layout which is not easy and requires understanding of MongoDB internals. Or the customer can logically delete the entire collection which is slow and will degrade the performance of the cluster to the point of being an availability risk.
Story: I would like to be able to delete all the documents in my collection in an efficient manner without having to recreate indexes or sharding configuration so that I can efficiently delete all the documents in a collection without having to recreate and reconfigure the collection which can require the use of performance degrading operations.
- duplicates
-
SERVER-111540 Storage API for truncating all data in a collection and its indexes
-
- Backlog
-