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

Allow $exists to efficiently use indexes

    • Type: Icon: Improvement Improvement
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      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 Unassigned
            Reporter:
            charlie.page@10gen.com Charlie Page
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: