Skip to content

Commit 0b071c6

Browse files
authored
DOCSP-21633 fixing format (#1412)
1 parent 8bc6ac9 commit 0b071c6

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

source/core/aggregation-pipeline-optimization.txt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -436,8 +436,14 @@ The following list shows some pipeline stages that can use indexes:
436436
must be the first stage in an aggregation pipeline.
437437

438438
Starting in MongoDB 4.2, in some cases, an aggregation pipeline can use
439-
a ``DISTINCT_SCAN`` index plan, which typically has higher performance
440-
than ``IXSCAN``.
439+
a ``DISTINCT_SCAN`` index plan that returns one document per index key
440+
value.
441+
442+
.. note::
443+
``DISTINCT_SCAN`` executes faster than ``IXSCAN`` if multiple
444+
documents per index value exist. However, index scan parameters
445+
might affect the time comparison of ``DISTINCT_SCAN`` and
446+
``IXSCAN``.
441447

442448
Indexes can :ref:`cover <read-operations-covered-query>` queries in an
443449
aggregation pipeline. A covered query uses an index to return all of the

0 commit comments

Comments
 (0)