ExportXMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • DB Integration & Observability
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      A limited version of the optimization was enabled in SERVER-129387. There are multiple ways to enable the query stats top-k optimization in more scenarios:

      1. Before $sort absorbs the $limit. Right now the optimization 
      2. Compound sort key
      3. When the projection renames the sort field like  {$project: {c: "$metrics.workingTimeMillis.sum"}}, {$sort: {c: -1}}, {$limit: 5}

            Assignee:
            Unassigned
            Reporter:
            Gil Alon
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: