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

Equality queries on _id aren't covered

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Done
    • 2.6.0-rc0
    • 2.6.0-rc2
    • Querying
    • Fully Compatible
    • ALL

    Description

      Regression from 2.4. Presumably never implemented for the IDHack runner?

      2.4.9:

      > db.foo.find({_id:1},{_id:1}).explain()
      {
      	"cursor" : "BtreeCursor _id_",
      	"isMultiKey" : false,
      	"n" : 1,
      	"nscannedObjects" : 0, // zero
      	"nscanned" : 1,
      	"nscannedObjectsAllPlans" : 0,
      	"nscannedAllPlans" : 1,
      	"scanAndOrder" : false,
      	"indexOnly" : true,
      	"nYields" : 0,
      	"nChunkSkips" : 0,
      	"millis" : 0,
      	"indexBounds" : {
      		"_id" : [
      			[
      				1,
      				1
      			]
      		]
      	},
      	"server" : "Rassi-MacBook-Pro.local:27017"
      }

      2.6.0-rc0:

      > db.foo.find({_id:1},{_id:1}).explain()
      {
      	"cursor" : "IDCursor",
      	"n" : 1,
      	"nscannedObjects" : 1, // not zero
      	"nscanned" : 1,
      	"millis" : 0,
      	"indexBounds" : {
      		"_id" : [
      			[
      				1,
      				1
      			]
      		]
      	},
      	"server" : "Rassi-MacBook-Pro.local:27017"
      }
      >

      Attachments

        Issue Links

          Activity

            People

              benety.goh@mongodb.com Benety Goh
              rassi J Rassi
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: