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

Avoid unnecessary KeyString copies in index interface

    • Type: Icon: Task Task
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Storage Execution
    • Execution Team 2024-01-22

      Currently when we perform an index seek, we end up doing multiple unnecessary copies of the index key. Most likely we could construct the input KeyString (the seek point) in place if we refactor to pass a buffer as an input parameter (e.g. to IndexEntryComparison::makeKeyStringFromSeekPointForSeek). Similarly, the key returned by the index seems to be copied more than necessary, and we may be able to do some refactoring here to improve things as well. There may be other places (besides the seek interface) where we are doing unnecessary copies as well.

      These copies are likely trivial for workloads where the index entries are being read from disk, but in the case where all data is in cache, the copies can have a non-trivial effect on overall performance.

            Assignee:
            backlog-server-execution [DO NOT USE] Backlog - Storage Execution Team
            Reporter:
            dan.larkin-york@mongodb.com Dan Larkin-York
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: