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

Indexed filed still exists in FETCH step

    XMLWordPrintable

Details

    • Question
    • Status: Closed
    • Major - P3
    • Resolution: Duplicate
    • 3.4.4
    • None
    • Index Maintenance
    • None

    Description

      I have a compound index:

       

      { 
          field1: 1, 
          field2: 1, 
          field3: 1 
      }

      When I do a query:

      { 
          field1: { $in: ['A', 'B'] },
          field2: { $in: ['C', 'D'] },
          field3: null
      }

      which hit the index field1_1_field2_1_field3_1, and in executionStats' IXSCAN step, field3's range is [null, null].

      BUT, { field3:

      { $eq: null }

      } exists in FETCH step ??? I have indexed it and use it in IXSCAN step, why mongo need to filter it again ?

      Attachments

        Issue Links

          Activity

            People

              nick.brewer Nick Brewer
              ByLomo Meng
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: