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

Similar queries yet horrible performance for one of them

    XMLWordPrintableJSON

Details

    • Icon: Question Question
    • Resolution: Incomplete
    • Icon: Critical - P2 Critical - P2
    • None
    • 3.2.13
    • Index Maintenance
    • None
    • MongoDB v3.2.13
      3-nodes cluster in MongoDB Cloud, M10 instances

    Description

      I have two queries that are strictly identical, except for one field.

      Query 1: "fieldX":

      { $in: [ "value1", "value2", "value3", "value4", "value5" ] }

      Query 2: "fieldX": "value6"

      Query 1 takes 2 seconds to execute.
      Query 2 takes 5.87 seconds to execute.

      Important information: my cluster has crashed a week ago during the creation of the index that is used by the queries. The MongoDB Cloud team restarted its 3 nodes.

      Attached are screenshots of the two queries and their execution times as displayed by Robomongo.

      Any ideas?

      Attachments

        1. 1.png
          1.png
          80 kB
        2. 2.png
          2.png
          77 kB
        3. explain1.json
          105 kB
        4. explain2.json
          96 kB
        5. index.json
          0.3 kB

        Activity

          People

            Unassigned Unassigned
            technical@tootsweet-app.com Elyes Gherib
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: