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

consider removing fast count mode, otherwise refactor it

    • Type: Icon: Question Question
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None

      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.

            Assignee:
            Unassigned Unassigned
            Reporter:
            aaron Aaron Staple
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: