File tree Expand file tree Collapse file tree 1 file changed +22
-3
lines changed Expand file tree Collapse file tree 1 file changed +22
-3
lines changed Original file line number Diff line number Diff line change @@ -10,10 +10,29 @@ Index Intersection
1010 :depth: 1
1111 :class: singlecol
1212
13+ .. important::
14+
15+ This page documents cases where the :doc:`query optimizer
16+ </core/query-plans>` **may** be able to use index intersection.
17+
18+ In practice, the :doc:`query optimizer </core/query-plans>` rarely
19+ selects plans that use index intersection.
20+
21+ Hash-based index intersection is disabled by default and sort-based
22+ index intersection is disfavored in plan selection. The optimizer
23+ behaves in this fashion in order to prevent bad plan selection.
24+
25+ Schema designs should not rely on index intersection. Instead,
26+ :doc:`compound indexes </core/index-compound>` should be used.
27+
28+ Future improvements to the query optimizer may allow the system to
29+ better identify cases where an index intersection plan would be
30+ beneficial.
31+
1332MongoDB can use the intersection of multiple indexes to fulfill
14- queries. In general, each index intersection
15- involves two indexes; however, MongoDB can employ multiple/nested index
16- intersections to resolve a query.
33+ queries. In general, each index intersection involves two indexes;
34+ however, MongoDB can employ multiple/nested index intersections to
35+ resolve a query.
1736
1837To illustrate index intersection, consider a collection ``orders`` that
1938has the following indexes:
You can’t perform that action at this time.
0 commit comments