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

Difference between nscanned and nscannedObjects is unclear

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: mongodb-2.6
    • Fix Version/s: v1.3.7
    • Component/s: manual
    • Labels:
      None
    • Environment:
      All
    • Last comment by Customer:
      true
    • Actual Time:
      8

      Description

      On this page http://docs.mongodb.org/manual/reference/method/cursor.explain/#explain-output-fields-core

      The explanation of the difference between nscanned and nscannedObjects in the explain plan is unclear.

      Need to define the specific differences between the two outputs and give a clear example of a query that will produce different outputs.

      e.g.

      explain.nscannedObjects
      Specifies the total number of documents scanned during the query. The nscannedObjects may be lower than nscanned, such as if the index covers a query. See indexOnly. Additionally, the nscannedObjects may be lower than nscanned in the case of multikey index on an array field with duplicate documents.

      explain.nscanned
      Specifies the total number of documents or index entries scanned during the database operation. You want n and nscanned to be close in value as possible. The nscanned value may be higher than the nscannedObjects value, such as if the index covers a query. See indexOnly.

        Attachments

          Activity

            People

            Assignee:
            tim.slavin Tim Slavin
            Reporter:
            joe.drumgoole Joe Drumgoole
            Participants:
            Last commenter:
            Jonathan Dahl Jonathan Dahl
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

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