-
Type:
Improvement
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Query Optimization
-
None
-
None
-
None
-
None
-
None
-
None
-
None
The first generated plan stability test for join optimization (https://github.com/10gen/mongo/pull/49764) uncovered certain issues in testing coverage that should be addressed before a second generated test is added.
- Only 5% of the queries return rows
- A lot of the queries have a join-optimized SBE prefix, followed by one or more $lookup stages. This seems to be because the grammar is adding a $match stage in the main pipeline that references fields from the joined collections, which is not a currently-supported scenario
- Index access methods are not very varied, there are only a few index lookup ranges, multi-field lookup, multi-range lookups and the like
- The clustering algorithm will run until each feature is represented at least once. This may be too little for important features – this should be configurable so that each feature is provably represented in ~10 of queries (if 10 queries from the candidate set had the feature to start with)
- OR stages in the plan are underrepresented
- Many of the queries have identical or almost-identical counters, which tells me that it is the same join order repeated over and over again with predicates of similar selectivity
- Due to the use of top-level $match stages, many of the $lookups are not join-optimization-eligible and therefore remain at the end of the join order
- Sarg-able predicates are few and far between, they need to be weighted more than non-sargable predicates.
- Large $in lists are not generated
- is related to
-
SERVER-119737 Join Optimization: Create a plan stability test for joins
-
- Closed
-
- related to
-
SERVER-119737 Join Optimization: Create a plan stability test for joins
-
- Closed
-