Details
-
Bug
-
Resolution: Duplicate
-
Major - P3
-
None
-
2.4.5
-
None
-
Windows 7 x64, MongoDB 2.4.5 (standalone)
-
ALL
Description
Trying to execute a covered query using 'true' in the projection instead of '1' seems to make the query non-covered.
According to explain plans, the following query is covered:
db.coll.find({_id : "val"},{_id : 1})
But this one isn't:
db.coll.find({_id : "val"},{_id : true})
Same goes for the following queries where the collection has an index on the field 'a':
/covered/ db.coll.find(
,{_id : 0, a : 1})
/* non-covered */ db.coll.find(
,{_id : 0, a : true})
/* non-covered */ db.coll.find(
,{_id : false, a : 1})
/* non-covered */ db.coll.find(
,{_id : false, a : true})
Hinting the non-covered queries doesn't seem to help.
Attachments
Issue Links
- duplicates
-
SERVER-3156 query projection spec using 'true' instead of '1' prevents covered index query
-
- Closed
-