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

dbtest for plan ranking

    XMLWordPrintableJSON

Details

    • Task
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • 2.6.0-rc0
    • 2.6.0-rc1
    • Querying
    • None

    Description

      We currently don't have any tests for plan ranking. Such tests would specify the indices, data, and query, and then show that ranking chooses the right plan.

      Some interesting cases include, but are not limited to:

      • Two plans hit EOF at the same time, but one is covered. Make sure that we prefer the covered plan.
      • A query where using an index requires us to look at the entire collection. In this case, a collection scan will hit EOF first and should win.
      • No plan produces any results or hits EOF. In this case we should never choose an index intersection solution.
      • No plan produces any results or hits EOF. In this case we should prefer covered solutions to non-covered solutions.
      • We have an index on "a" which is somewhat selective and an index on "b" which is highly selective (will cause an immediate EOF). Make sure that a query with predicates on both "a" and "b" will use the index on "b".

      Attachments

        Activity

          People

            hari.khalsa@10gen.com hari.khalsa@10gen.com
            david.storch@mongodb.com David Storch
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: