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

[CQF] Investigate lowerEqPrefixes being called for Sargable [Seek]

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Query Optimization
    • Fully Compatible
    • QO 2023-08-07, QO 2023-08-21, QO 2023-09-04
    • 168

      When I run recursive_ix_nav.js and log this call to lowerEqPrefixes, specifically the value of const ABT& n, I see Sargable [Seek] nodes being logged. This seems wrong because lowerEqPrefixes is responsible for creating IndexScan stages, or more generally the NLJ / distinct scan / IndexScan pattern we use for recursive index navigation.

      ------

      Also, this Sargable [Seek] node has a nonempty candidateIndexes field. I believe we always populate this field, even though we will end up ignoring it when the target is Seek. Instead we should probably leave it empty in the Seek case. That could both avoid the unnecessary work to populate it, and also prevent us from calling lowerEqPrefixes unnecessarily.

      This seems related to SERVER-78090.

            Assignee:
            ruoxin.xu@mongodb.com Ruoxin Xu
            Reporter:
            david.percy@mongodb.com David Percy
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: