-
Type:
Improvement
-
Resolution: Duplicate
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Query Optimization
-
None
-
None
-
None
-
None
-
None
-
None
-
None
To enable proper testing, costs and cardinalities need to be exposed in the explain, both the ones of the intermediate joins and of the final query.
A mock example:
Enterprise tpch> db.part.aggregate([{"$lookup":{"from":"partsupp","localField":"p_partkey","foreignField":"ps_partkey","as":"partsupp"}}]).explain();
{
explainVersion: '2',
queryPlanner: {
...
winningPlan: {
...
costEstimate: AAA # Cost estimate for the entire plan
cardinalityEstimate: BBB # Cardinality estimate for the entire plan;
...
queryPlan: {
stage: 'EQ_LOOKUP',
costEstimate: XXX # Cost estimate for this particular join
cardinalityEstimate: YYY # Cardinality estimate for this particular join
...
- duplicates
-
SERVER-111473 Include costing/cardinality information in explain for pipelines which use the join optimizer
-
- Closed
-