Allow $exists to efficiently use indexes

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Duplicate
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Currently our indexes use null for both literal null and document doesn't contain such a value. The document has to be fetched to make a distinction between these two things. This means that what should be a simple use of an index turns into scanning many documents. Not needing to fetch documents (for instance, having a

      {no such field}

      bson type) to determine this would allow for indexes to be used efficiently in both $exists : true queries and other queries when using compound indexes without have to create both sparse and non-spare indexes to service different types of queries.

              Assignee:
              Unassigned
              Reporter:
              Charlie Page (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: