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

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

      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.

            Assignee:
            Unassigned Unassigned
            Reporter:
            stephen.tunney@mongodb.com Stephen Tunney (Inactive)
            Votes:
            2 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: