Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-4369

Comment on: "manual/core/index-intersection.txt"

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Incomplete
    • Icon: Major - P3 Major - P3
    • 01112017-cleanup
    • None
    • manual

    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(

      { x : i , y: i+10, z:[i%2, i*3]}

      )
      }
      and two indexes over x and y, so getIndexes command returns me
      db.dummy.getIndexes()
      [
      {
      "v" : 1,
      "key" :

      { "_id" : 1 }

      ,
      "name" : "id",
      "ns" : "cursoMongo.dummy"
      },
      {
      "v" : 1,
      "key" :

      { "x" : 1 }

      ,
      "name" : "x_1",
      "ns" : "cursoMongo.dummy"
      },
      {
      "v" : 1,
      "key" :

      { "y" : 1 }

      ,
      "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" :

      { "x" : [ [ 1, Infinity ] ] }

      ,
      "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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            xgen-internal-docs Docs Collector User (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              9 years, 13 weeks, 5 days ago