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

Use index is order dependent

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major - P3 Major - P3
    • None
    • 2.6.1
    • Index Maintenance
    • None
    • ALL

    Description

      mongodb (2.6.1) use index is order dependent.

      in mongodb (2.4.10):
      indexes: (a_1), (a_1, b_1)

      db.test.find(

      {a: 1, b: 1}

      ).explain() -->
      indexBounds: (a_1, b_1)

      but in mongodb (2.6.1):
      indexes: (a_1), (a_1, b_1)

      db.test.find(

      {a: 1, b: 1}

      ).explain() -->
      indexBounds: (a_1)

      if I build index in reverse order:
      indexes: (a_1, b_1), (a_1)

      db.test.find(

      {a: 1, b: 1}

      ).explain() -->
      indexBounds: (a_1, b_1)

      Attachments

        Activity

          People

            Unassigned Unassigned
            fates.lachesis@gmail.com Michael Yang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: