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

explain() shows non complete plan for sharded query when using compound key

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • ALL

      If you specify a query with a compound key with the leading edge being the shard key, and the secondary predicate is _id, then the optimizer performs the proper plan (it doesn't federate the query), but reports only the secondary predicate index as being read, and doesn't indicate that the shard key index was read. The plan would presumably be: read the shard key index, then filter results for secondary key. But this isn't indicated in the plan itself.

      Here is a sample session:
      https://gist.github.com/2636220

            Assignee:
            aaron Aaron Staple
            Reporter:
            kennygorman Kenny Gorman
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: