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

Inefficient query on view due to $limit and $skip stages not being pushed down

    • Type: Icon: Improvement Improvement
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 4.2.0
    • Component/s: Performance
    • Labels:
      None
    • Query 2019-10-21

      I've noticed that views are examining all documents matching query regardless of the value provided to the cursor's skip or limit. The query is quite simple and the aggregated data from the view is also very simple. But since the view is examining all documents that match that specific query we are unable to use the view with that pipeline due to how long it takes to complete the query. 

            Assignee:
            david.storch@mongodb.com David Storch
            Reporter:
            edumanasses@gmail.com Eduardo Justi
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: