-
Type: Improvement
-
Resolution: Unresolved
-
Priority: 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.