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

Similar queries yet horrible performance for one of them

    • Type: Icon: Question Question
    • Resolution: Incomplete
    • Priority: Icon: Critical - P2 Critical - P2
    • None
    • Affects Version/s: 3.2.13
    • Component/s: Index Maintenance
    • Labels:
      None
    • Environment:
      MongoDB v3.2.13
      3-nodes cluster in MongoDB Cloud, M10 instances

      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?

        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

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

              Created:
              Updated:
              Resolved: