Uploaded image for project: 'MongoDB Database Tools'
  1. MongoDB Database Tools
  2. TOOLS-1733

Have flag to build empty collection and indexes first with mongorestore

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Accepted
    • Priority: Minor - P4
    • Resolution: Unresolved
    • Affects Version/s: 3.2.12
    • Fix Version/s: None
    • Component/s: mongorestore
    • Labels:
      None

      Description

      I have a mongodump that contains a collection with 50 million documents and metadata for 16 compound indexes which are made up of between 4 and 9 fields each. It has been found that doing this full mongorestore with indexes takes roughly 6 hours with no visible resource contention on the server during this period.

      However, if I create an empty collection and build the 16 indexes manually on the empty collection and then mongorestore the data only using the –noIndexRestore flag this takes roughly 2 to 3 hours.

      I know there are issues relating to index compactness/efficiency from doing the data restore against an empty collection with indexes already built. However, the difference in time taken to do a restore in this way is so much less than using mongorestore that it should merit a new flag in mongorestore which gives users the option to create the empty collection and the build the indexes first.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              backlog-server-tools Backlog - Server Tools Team
              Reporter:
              stephen.tunney Stephen Tunney
              Votes:
              2 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated: