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

Investigate generalisation of DISTINCT_SCAN for clustered collection _id subfields

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • None
    • Query Optimization

    Description

      In order to get a list of all pre-image collections present in config.system.preimages we are performing something similar to DISTINCT_SCAN on _id.nsUUID.

      The problem is that right now DISTINCT_SCAN falls back to a full collection scan since there are no indexes available for the collection and we are scanning a subfield of _id.

      We can work around this in our use-case since we know the format of _id and that nsUUID is the first field of the identifier. As a result we can safely enumerate them using simple RecordCursor::seekNear. Ideally we would prefer to use DISTINCT_SCAN.

      Attachments

        Activity

          People

            backlog-query-optimization Backlog - Query Optimization
            jordi.olivares-provencio@mongodb.com Jordi Olivares Provencio
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: