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

Cursor explain strange output : QueryOptimizerCursor

    • Windows

      I created an index on a field

      db.bookingCollection.create_index([("IDs.code", pymongo.ASCENDING),("dates.begin", pymongo.ASCENDING)])
      

      Then I run an explain on a specific query and force it to use my previously created index :

      cursor = db.bookingCollection.find({"IDs.code": "XXYY00", "dates.begin": date}).hint([("IDs.code", pymongo.ASCENDING),("dates.begin", pymongo.ASCENDING)]).sort([("customers.last_name", pymongo.ASCENDING)]).limit(100)
      e = cursor.explain()
      

      in e for the "cursor" e['cursor'] field I get QueryOptimizerCursor.

      I did not manage to find any documentation on that QueryOptimizerCursor. cursor here http://docs.mongodb.org/manual/reference/method/cursor.explain/#cursor.explain.

      If I remove the limit field I get :

      BtreeCursor proptyIDs.propty_code_1_room_stay.dates.begin_1
      

      That's what I expect and not the query optimizer cursor.

      Also I repeat the same experience with the limit field but with mongoDB 2.4
      I got

      BtreeCursor proptyIDs.propty_code_1_room_stay.dates.begin_1
      

      That what I expect too

      I am wondering if it is a bug or if something is missing in the doc.

      Regards,

      Sylvain

            Assignee:
            david.storch@mongodb.com David Storch
            Reporter:
            scoulombel Sylvain Coulombel
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: