Display projection in express path expain

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Major - P3
    • 8.3.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Execution
    • Fully Compatible
    • QE 2025-08-04, QE 2025-08-18
    • None
    • 3
    • TBD
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Currently an explain for this query doesn't show the projection:

      rs0 [direct: primary] test> db.test.find({_id: 0}, {_id: 1, a: 1}).explain().queryPlanner.winningPlan
      {
        isCached: false,
        stage: 'EXPRESS_IXSCAN',
        keyPattern: '{ _id: 1 }',
        indexName: '_id_'
      }  

      After SERVER-103991 express queries for user indexes will also support simple projections and they will also won't display them.

       

      We should add projection field and a boolean flag if it is covered or not to explain output for express plans.

            Assignee:
            Ivan Fefer
            Reporter:
            Ivan Fefer
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: