Skip to content

Commit 95092e9

Browse files
mdb-ashleyAshley Brown
andauthored
DOCS-14409 Clarify multikey index usage (#773) (#916)
* Updating multikey sort fact; added glossary entry for blocking sort * Bug fixes * Bug fixes * Bug fixes * Incorporating internal review comments * Removing example * tweaks * Resolving internal review comments * Incorporating review comments Co-authored-by: Ashley Brown <[email protected]> Co-authored-by: Ashley Brown <[email protected]>
1 parent 0bd3014 commit 95092e9

File tree

2 files changed

+33
-7
lines changed

2 files changed

+33
-7
lines changed
Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
As a result of changes to sorting behavior on array fields in MongoDB
2-
3.6, when sorting on an array indexed with a
3-
:doc:`multikey index </core/index-multikey/>` the query plan includes
4-
a blocking SORT stage. The new sorting behavior may negatively impact
5-
performance.
2+
4.4, when you sort on an array indexed with a
3+
:ref:`multikey index <index-type-multikey>`, the query plan includes
4+
a :term:`blocking sort` stage, unless:
65

7-
In a blocking SORT, all input must be consumed by the sort step before
8-
it can produce output. In a non-blocking, or *indexed* sort, the
9-
sort step scans the index to produce results in the requested order.
6+
- The index :ref:`boundaries <multikey-index-bounds-intersecting>` for all sort
7+
fields are ``[MinKey, MaxKey]``, *and*
8+
9+
- No boundaries for any multikey-indexed field have the same path prefix as the sort
10+
pattern.

source/reference/glossary.txt

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,25 @@ Glossary
8282
maintenance operations on a sharded cluster. See
8383
:ref:`sharding-balancing`.
8484

85+
backup cursor
86+
A :term:`tailable cursor` that points to a list of backup files.
87+
Backup cursors are for internal use only.
88+
89+
blocking sort
90+
A sort that must be performed in memory before output is returned.
91+
Blocking sorts may impact performance for large data sets. Use an
92+
:term:`indexed sort` to avoid a blocking sort.
93+
94+
See :ref:`sort-index-use` for more information on blocking sort
95+
operations.
96+
97+
bounded collection scan
98+
A plan used by the :doc:`query optimizer </core/query-plans>` that
99+
eliminates documents with specific field value ranges. For
100+
example, if a range of date field values is outside of a specified
101+
date range, the documents in that range are eliminated from the
102+
query plan. See :ref:`explain-output-collection-scan`.
103+
85104
BSON
86105
A serialization format used to store :term:`documents <document>` and make
87106
remote procedure calls in MongoDB. "BSON" is a portmanteau of the words
@@ -418,6 +437,12 @@ Glossary
418437
The international date format used by :binary:`~bin.mongo`
419438
to display dates. The format is: ``YYYY-MM-DD HH:MM.SS.millis``.
420439

440+
indexed sort
441+
A sort in which an index provides the sorted result. Sort operations that
442+
use an index often have better performance than a :term:`blocking sort`.
443+
See :ref:`Use Indexed to Sort Query Results <sorting-with-indexes>` for
444+
more information.
445+
421446
interrupt point
422447
A point in an operation's lifecycle when it can
423448
safely abort. MongoDB only terminates an operation

0 commit comments

Comments
 (0)