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

consider removing fast count mode, otherwise refactor it

    Details

    • Type: Question
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Gone away
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      We have a 'fast' count mode that runs in cases like a query on

      {a:'c',b:'d'}

      with index

      {a:1,b:1}

      . (Among other restrictions, all fields of the index must be present and the queried values must not be objects or numbers.) This optimization adds implementation complexity and has been a source of bugs (eg SERVER-4529). Additionally, the performance of this special counting mode has likely been degraded by changes over time (eg SERVER-3449).

      Also, I'm not sure if we've actually measured the performance of fast count mode. We might consider removing it, otherwise we might refactor it out of the main query path.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                aaron Aaron Staple (Inactive)
                Participants:
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: