[DOCS-1036] Add FAQ: What is the overhead of dropping a large collection in a sharded environment? Created: 23/Jan/13 Updated: 30/Oct/23 Resolved: 27/Jul/16 |
|
| Status: | Closed |
| Project: | Documentation |
| Component/s: | manual |
| Affects Version/s: | None |
| Fix Version/s: | Server_Docs_20231030 |
| Type: | Task | Priority: | Minor - P4 |
| Reporter: | Barrie Segal | Assignee: | Kay Kim (Inactive) |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | sharding | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Participants: | |||||
| Days since reply: | 7 years, 29 weeks ago | ||||
| Description |
|
The way to do this in a sharded environment is directly through the mongos. Do not drop the collection from the mongod. While drop does hold the write lock, it doesn't have a large performance overhead, even for large collections. It deletes the extents on disk thus does not have to individually remove each of the individual documents. Once finished, run flushRouterConfig to make sure that all metadata relating to your sharded cluster is up to date. |
| Comments |
| Comment by Emily Hall [ 27/Jul/16 ] |
|
Closed for housekeeping on 7/27/2016 by Emily Hall. |