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

"|" in query string occur into a full index scan, slow query

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Duplicate
    • None
    • None
    • Querying
    • None
    • ALL

    Description

      db.wd_data.find({"path":{"$in":[/^\/PersonalWx\/Wx3001\/A李鑫老师助理6965号刘赫楠\/WxTxl\/三119扫单D!nG先生Super7李先生\//]}}

      vs

      db.wd_data.find({"path":{"$in":[/^\/PersonalWx\/Wx3001\/A李鑫老师助理6965号刘赫楠\/WxTxl\/三119扫单D!nG|先生Super7李先生\//]}}

      the difference is the first one has no "|" in the query string, the second one does.
      I will attach the explain() info, they show the difference

      Attachments

        1. explain1
          4 kB
        2. explain2
          4 kB

        Issue Links

          Activity

            People

              kelsey.schubert@mongodb.com Kelsey Schubert
              dancer dancer
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: