Insufficient parallel array support in samplingCE

XMLWordPrintableJSON

    • Query Optimization
    • ALL
    • Hide
      const coll = db.getSiblingDB("test").getCollection("collection");
      coll.drop();
      db.adminCommand({ setParameter: 1, internalQueryCBRCEMode: "samplingCE" });
      
      coll.createIndex({ d: 1, "d.a": -1, a: -1 });
      
      coll.insertOne({ d: [{ x: 0 }, { y: 0 }] });
      
      coll.explain().find({
        d: { $gt: 0 },
        a: { $gt: 0 },
      });
      
      Show
      const coll = db.getSiblingDB("test").getCollection("collection"); coll.drop(); db.adminCommand({ setParameter: 1, internalQueryCBRCEMode: "samplingCE" }); coll.createIndex({ d: 1, "d.a": -1, a: -1 }); coll.insertOne({ d: [{ x: 0 }, { y: 0 }] }); coll.explain().find({ d: { $gt: 0 }, a: { $gt: 0 }, });
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Given a field (eg. a), an array of objects, and a nested field inside a (eg. a.b), multikey indices support both the fields being in the index (like {"a":1, "a.b": 1}) but samplingCE does not, leading to the tassert 10061113 during index skip estimation: "Parallel arrays are not supported; at most one index field may be array-valued per document".

      Note that a similar argument likely applies for parallel nested indexed fields along a common array path, like the index {"a.b":1, "a.c": 1} and a document like {a: [{b: 0, c: 0}]}

            Assignee:
            Nicholas Zolnierz
            Reporter:
            Kartal Kaan Bozdogan
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: