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

Mongo Query Taking Lot of Time Selecting Index

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Works as Designed
    • Affects Version/s: 3.0.4
    • Fix Version/s: None
    • Component/s: Querying
    • Labels:
      None
    • Operating System:
      ALL

      Description

      There are two issues happening :
      First Issue : Query taking lot of time in deciding which index to use.
      Eg: If we run an query X , then it takes a lot of time (more than 5 minutes) )and on checking the log it was using a index Y.
      Now if I run the query X with index hint Y, it runs in couple of seconds.
      That means the time it was taking is not in query execution but before that. Very strange

      Second Issue : In some cases it is not selecting the right index also. If my query is on fields A,B,C and I have indexes A and A_B_C created, then it is choosing the index A instead if A_B_C

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              david.storch David Storch
              Reporter:
              arpit@limeroad.com arpit wanchoo
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: