Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-65481

Add efficient bulk builder for column indexes

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 6.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Fully Compatible
    • QE 2022-05-16, QE 2022-05-30, QE 2022-06-13, QE 2022-06-27, QE 2022-07-11, QE 2022-07-25
    • 151

      When bulk building column indexes we can take advantage of the fact that a collection scan produces results in RID order. (We should confirm this with the storage exec team)

      As we walk the collection, we maintain a table from (path -> [list of cells ordered by RID]). For each document we take out of the collection, we produce all of the cells for it, and append them to the corresponding list.

      At the end, we sort by the path (the key of our table) and then insert each list into the index. This avoids doing a blocking sort over the entire set of keys.

            Assignee:
            justin.seyster@mongodb.com Justin Seyster
            Reporter:
            ian.boros@mongodb.com Ian Boros
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: