Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-4428

Queries executed via MongoS will always project the sort key

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Gone away
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: manual
    • Labels:
    • # Replies:
      2
    • Last comment by Customer:
      true
    • Actual Time:
      4
    • Sprint:
      Docs Sprint 2016(0711-0729)

      Description

      This is a "gotcha" when using index filters and evaluating query performance.

      When you issue a query via a MongoS that includes both a Projection and a Sort field, the sort field will always be included within the projection set to the shards. This is needed for sorting on the result data from shards by desired field on the MongoS.

      This means when you are adding index filters using projections, you should always expect to add the sort field to the projection in sharded environments.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              andrew.aldridge Andrew Aldridge
              Reporter:
              david.hows David Hows
              Participants:
              Last commenter:
              Andrew Aldridge
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since reply:
                4 years, 18 weeks, 6 days ago
                Date of 1st Reply: