[SERVER-17376] Allow $exists to efficiently use indexes Created: 25/Feb/15  Updated: 25/Feb/15  Resolved: 25/Feb/15

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Charlie Page Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-12869 Index null values and missing values ... Backlog
Participants:

 Description   

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.



 Comments   
Comment by Scott Hernandez (Inactive) [ 25/Feb/15 ]

Dup of SERVER-12869

Generated at Thu Feb 08 03:44:12 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.