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

Investigate when to avoid pushing down FETCH for rooted or queries on clustered collections

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Integration

      SERVER-77280 made it possible for queries like 

      coll.find( { $or: [{ _id: 8 }, { a: 5 }] } }) 

      to produce a query plan that has both a clustered collection scan and index scan for clustered collections. However, we push down a FETCH stage for each index scan node. We should see if there are cases where we can avoid adding a FETCH stage unnecessarily. One idea is to avoid pushing a FETCH when we have count, like:

      coll.find( { $or: [{ _id: 8 }, { a: 5 }] } }).count() 

       

       

            Assignee:
            backlog-query-integration [DO NOT USE] Backlog - Query Integration
            Reporter:
            gil.alon@mongodb.com Gil Alon
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: