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

[SBE] Support queries like "find({_id:1},{a:1})" and "find({_id:1}).returnKey()"

    XMLWordPrintable

Details

    • Task
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 4.9.0
    • Querying
    • Fully Compatible

    Description

      When SBE is enabled, I noticed that some simple queries such as "find({_id:1},{a:1})" and "find({_id:1}).returnKey()" fail with an error message that says "IDHack plan is not supported by SBE yet".

      Looking at the current state of the SBE stage builder code, it seems like we have all the infrastructure necessary to support the two queries mentioned above.

      The goal of this task is to (1) figure out what changes should be made to the SBE stage builder so that SBE can run the find() queries below and (2) to implement said changes:

      > db.c.drop()
      > db.c.insert({_id: 1, a: 2})
      > db.c.createIndex({a: 1})
       
      > db.c.find({_id: 1}, {a: 1})
       
      > db.c.find({_id: 1}).returnKey()

      Attachments

        Issue Links

          Activity

            People

              andrew.paroski@mongodb.com Drew Paroski
              andrew.paroski@mongodb.com Drew Paroski
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: