Details
-
Bug
-
Resolution: Incomplete
-
Major - P3
-
None
-
MongoDB 2.6 Index Intersection
*Location*: http://docs.mongodb.org/manual/core/index-intersection/
*User-Agent*: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:31.0) Gecko/20100101 Firefox/31.0
*Screen Resolution*: 1280 x 1024
*repo*: docs
*source*: core/index-intersection
Description
Hi,
I'm following first steps from your Index Intersection manual page on my own collection. I've created a collection like this:
for (var i = 1; i <= 50000; i++) {
db.dummy.insert(
)
}
and two indexes over x and y, so getIndexes command returns me
db.dummy.getIndexes()
[
{
"v" : 1,
"key" :
,
"name" : "id",
"ns" : "cursoMongo.dummy"
},
{
"v" : 1,
"key" :
,
"name" : "x_1",
"ns" : "cursoMongo.dummy"
},
{
"v" : 1,
"key" :
,
"name" : "y_1",
"ns" : "cursoMongo.dummy"
}
]
Then, if I run
db.dummy.find({x:{$gt:1}, y:{$gt:1}}).explain()
{
"cursor" : "BtreeCursor x_1",
"isMultiKey" : false,
"n" : 49999,
"nscannedObjects" : 49999,
"nscanned" : 49999,
"nscannedObjectsAllPlans" : 50100,
"nscannedAllPlans" : 50100,
"scanAndOrder" : false,
"indexOnly" : false,
"nYields" : 390,
"nChunkSkips" : 0,
"millis" : 76,
"indexBounds" :
,
"server" : "Zoidberg:27017",
"filterSet" : false
}
the cursor field is BtreeCursor x_1, no Complex Plan cursor.
My MongoDB version is
> db.version()
2.6.5
and it runs over Linux 3.13.0-24-generic x86_64.
I don't know what I'm doing wrong. Any suggestions will be welcome.
Thank you.