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

Explain output for PlanExecutorExpress should indicate whether shard filtering occurred

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: None
    • Query Optimization

      We recently introduced the so-called "express path" – an optimized path for quickly answering simple find-by-key style queries. Even simple find-one-by-key queries may require shard filtering in sharded deployments to ensure we do not return orphans to the client. Therefore, the express path performs shard filtering in some cases. However, this fact is not represented in the explain output. For example, this expected golden test output demonstrates how we represent a plan which involves shard filtering. Copying it here for reference:
       

      {
      	"indexName" : "_id_",
      	"keyPattern" : "{ _id: 1 }",
      	"stage" : "EXPRESS_IXSCAN"
      }
      

      You can see that this makes no mention of shard filtering. This ticket suggests improving the explain output generated by PlanExecutorExpress to somehow explicitly indicate if shard filtering occurred or not. That may be helpful for future diagnosis of issues in the field. It would also immediately strengthen the golden test case I linked to above.

            Assignee:
            Unassigned Unassigned
            Reporter:
            david.storch@mongodb.com David Storch
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: