diff options
Diffstat (limited to 'src/mongo/db/query/planner_analysis.h')
-rw-r--r-- | src/mongo/db/query/planner_analysis.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/mongo/db/query/planner_analysis.h b/src/mongo/db/query/planner_analysis.h index e272cae2948..9efc9419ec1 100644 --- a/src/mongo/db/query/planner_analysis.h +++ b/src/mongo/db/query/planner_analysis.h @@ -121,6 +121,20 @@ public: */ static std::unique_ptr<QuerySolution> removeProjectSimpleBelowGroup( std::unique_ptr<QuerySolution> soln); + + /** + * For the provided 'eqLookupNode', determines what join algorithm should be used to execute it + * and marks the node accordingly. In particular: + * - An indexed nested loop join is chosen if an index on the foreign collection can be used to + * answer the join predicate. + * - A hash join is chosen if disk use is allowed and if the foreign collection is sufficiently + * small. + * - A nested loop join is chosen in all other cases. + */ + static void determineLookupStrategy( + EqLookupNode* eqLookupNode, + const std::map<NamespaceString, SecondaryCollectionInfo>& collectionsInfo, + bool allowDiskUse); }; } // namespace mongo |