Skip to content

Commit 155c72f

Browse files
authored
DOCSP-21633 fixing format (#1411)
1 parent 0735b39 commit 155c72f

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
@@ -451,8 +451,14 @@ The following list shows some pipeline stages that can use indexes:
451451
must be the first stage in an aggregation pipeline.
452452

453453
Starting in MongoDB 4.2, in some cases, an aggregation pipeline can use
454-
a ``DISTINCT_SCAN`` index plan, which typically has higher performance
455-
than ``IXSCAN``.
454+
a ``DISTINCT_SCAN`` index plan that returns one document per index key
455+
value.
456+
457+
.. note::
458+
``DISTINCT_SCAN`` executes faster than ``IXSCAN`` if multiple
459+
documents per index value exist. However, index scan parameters
460+
might affect the time comparison of ``DISTINCT_SCAN`` and
461+
``IXSCAN``.
456462

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

0 commit comments

Comments
 (0)