Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-1036

Add FAQ: What is the overhead of dropping a large collection in a sharded environment?

    XMLWordPrintableJSON

Details

    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.

      Attachments

        Activity

          People

            kay.kim@mongodb.com Kay Kim (Inactive)
            barrie Barrie Segal
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              7 years, 29 weeks ago