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

Avoid COLUMN_SCAN if dependencies prefix each other as in "a" and "a.b"

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 6.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • Fully Compatible
    • ALL
    • QE 2022-07-25, QE 2022-08-08, QE 2022-08-22
    • 35

      There's currently a dassert that fails if this scenario arises. I think that parent/child dependencies (or more generally 'ancestral' dependencies like "a" and "a.b.c") should probably disqualify a COLUMN_SCAN since we will need to go to the row store probably to re-assemble the parent. This may not be the case in all cases, but should be a fairly good heuristic for the time being. For example I could imagine querying for {a.nested: {$exists: false}} and somehow knowing that means that in all matching results a will be a scalar value.

      I think fixing it to work in this case would not be too bad, but it's probably not something that would be beneficial most of the time.

            charlie.swanson@mongodb.com Charlie Swanson
            charlie.swanson@mongodb.com Charlie Swanson
            0 Vote for this issue
            3 Start watching this issue