diff --git a/source/core/index-intersection.txt b/source/core/index-intersection.txt index bd2374da44a..b0eaf7c8c16 100644 --- a/source/core/index-intersection.txt +++ b/source/core/index-intersection.txt @@ -10,10 +10,29 @@ Index Intersection :depth: 1 :class: singlecol +.. important:: + + This page documents cases where the :doc:`query optimizer + ` **may** be able to use index intersection. + + In practice, the :doc:`query optimizer ` rarely + selects plans that use index intersection. + + Hash-based index intersection is disabled by default and sort-based + index intersection is disfavored in plan selection. The optimizer + behaves in this fashion in order to prevent bad plan selection. + + Schema designs should not rely on index intersection. Instead, + :doc:`compound indexes ` should be used. + + Future improvements to the query optimizer may allow the system to + better identify cases where an index intersection plan would be + beneficial. + MongoDB can use the intersection of multiple indexes to fulfill -queries. In general, each index intersection -involves two indexes; however, MongoDB can employ multiple/nested index -intersections to resolve a query. +queries. In general, each index intersection involves two indexes; +however, MongoDB can employ multiple/nested index intersections to +resolve a query. To illustrate index intersection, consider a collection ``orders`` that has the following indexes: