Wildcard indices do not produce skip scans where the wildcard is unconstrained

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Query Optimization
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Tested with 8.2 & on master.

      db.a.drop()
      db.a.createIndex({a:1, "b.$**":1, c: 1})
      db.a.insertOne({})
      db.a.explain().find({a:1, c: 1})

      This produce the (sole) plan:

              indexBounds: {
                a: [ '[1, 1]' ],
                '$_path': [ '[MinKey, MaxKey]' ],
                c: [ '[MinKey, MaxKey]' ]
              }
      

      ie. c is unconstrained.

            Assignee:
            Unassigned
            Reporter:
            Kartal Kaan Bozdogan
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: