Skip to content

Commit bda8d1e

Browse files
authored
DOCSP-26462 query optimization process - replica state (#7114)
1 parent ac086cb commit bda8d1e

26 files changed

+40
-41
lines changed

source/core/query-plans.txt

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -155,12 +155,12 @@ Plan Cache Debug Info Size Limit
155155
--------------------------------
156156

157157
Starting in MongoDB 5.0, the
158-
:doc:`plan cache </core/query-plans>` will save full ``plan cache``
159-
entries only if the cumulative size of the ``plan caches`` for all
160-
collections is lower than 0.5 GB. When the cumulative size of the
161-
``plan caches`` for all collections exceeds this threshold, additional
162-
``plan cache`` entries are stored without the following debug
163-
information:
158+
:ref:`plan cache <query-plans-query-optimization>` will save full
159+
``plan cache`` entries only if the cumulative size of the
160+
``plan caches`` for all collections is lower than 0.5 GB. When the
161+
cumulative size of the ``plan caches`` for all collections exceeds this
162+
threshold, additional ``plan cache`` entries are stored without the
163+
following debug information:
164164

165165
- :ref:`createdFromQuery <plancachestats-createdFromQuery>`
166166
- :ref:`cachedPlan <plancachestats-cachedPlan>`
@@ -219,13 +219,13 @@ Availability
219219

220220
The ``queryHash`` and ``planCacheKey`` are available in:
221221

222-
- :doc:`explain() output </reference/explain-results>` fields:
222+
- :ref:`explain() output <explain-results>` fields:
223223
:data:`queryPlanner.queryHash <explain.queryPlanner.queryHash>` and
224224
:data:`queryPlanner.planCacheKey <explain.queryPlanner.planCacheKey>`
225225

226-
- :doc:`profiler log messages </tutorial/manage-the-database-profiler>`
227-
and :doc:`diagnostic log messages (i.e. mongod/mongos log
228-
messages)</reference/log-messages>` when logging slow queries.
226+
- :ref:`profiler log messages <database-profiler>`
227+
and :ref:`diagnostic log messages (i.e. mongod/mongos log
228+
messages)<log-messages-ref>` when logging slow queries.
229229

230230
- :pipeline:`$planCacheStats` aggregation stage (*New in MongoDB 4.2*)
231231

source/core/read-preference-hedge-option.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Hedged Read Option
77
.. default-domain:: mongodb
88

99
You can specify the use of :ref:`hedged reads <mongos-hedged-reads>` for
10-
non-``primary`` :doc:`read preferences </core/read-preference>` on sharded
10+
non-``primary`` :ref:`read preferences <read-preference>` on sharded
1111
clusters.
1212

1313
With hedged reads, the :binary:`~bin.mongos` instances can route read

source/core/read-preference-mechanics.txt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,11 @@ Hedged Reads
7777
````````````
7878

7979
:binary:`~bin.mongos` supports :ref:`hedged reads <mongos-hedged-reads>` for
80-
non-``primary`` :doc:`read preferences </core/read-preference>` modes.
80+
non-``primary`` :ref:`read preference <read-preference>` modes.
8181
That is, :binary:`~bin.mongos` can send an additional read to another member,
8282
if available, to hedge the read operation if using non-``primary``
83-
:doc:`read preferences </core/read-preference>`. The additional read sent to
84-
hedge the read operation uses the ``maxTimeMS`` value of
85-
:parameter:`maxTimeMSForHedgedReads`.
83+
read preferences. The additional read sent to hedge the read operation
84+
uses the ``maxTimeMS`` value of :parameter:`maxTimeMSForHedgedReads`.
8685

8786
.. include:: /includes/list-hedged-reads-operations.rst
8887

source/core/sharding-shard-a-collection.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ shard a collection:
3434
- Specify a document ``{ <shard key field1>: <1|"hashed">, ... }``
3535
where
3636

37-
- ``1`` indicates :doc:`range-based sharding </core/ranged-sharding>`
37+
- ``1`` indicates :ref:`range-based sharding <sharding-ranged>`
3838

3939
- ``"hashed"`` indicates :doc:`hashed sharding </core/hashed-sharding>`.
4040

source/core/transactions-production-consideration.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ Transactions and Security
140140
-------------------------
141141

142142
- If running with :ref:`access control <authorization>`, you must
143-
have :doc:`privileges </reference/built-in-roles>` for the
143+
have :ref:`privileges <built-in-roles>` for the
144144
:ref:`operations in the transaction <transactions-operations>`.
145145

146146
- If running with :ref:`auditing <auditing>`, operations in an

source/includes/fact-explain-results-categories.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
- ``command``, which details the command being explained;
66

77
- :ref:`queryPlanner`, which details the plan selected by the
8-
:doc:`query optimizer </core/query-plans>` and lists the rejected
8+
:ref:`query optimizer <read-operations-query-optimization>` and lists the rejected
99
plans;
1010

1111
- :ref:`executionStats`, which details the execution of the winning

source/includes/fact-explain-verbosity-executionStats.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
MongoDB runs the :doc:`query optimizer </core/query-plans>` to choose
1+
MongoDB runs the :ref:`query optimizer <read-operations-query-optimization>` to choose
22
the winning plan, executes the winning plan to completion, and returns
33
statistics describing the execution of the winning plan.
44

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
MongoDB runs the :doc:`query optimizer </core/query-plans>` to choose
1+
MongoDB runs the :ref:`query optimizer <read-operations-query-optimization>` to choose
22
the winning plan for the operation under evaluation. |explain| returns
33
the :data:`~explain.queryPlanner` information for the evaluated
44
|operation|.

source/includes/getMore-slow-queries.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ Starting in MongoDB 5.1, when a :dbcommand:`getMore` command is logged
22
as a :ref:`slow query <log-message-slow-ops>`, the :ref:`queryHash
33
<query-hash>` and :ref:`planCacheKey <plan-cache-key>` fields are added
44
to the :ref:`slow query log message <log-message-slow-ops>` and the
5-
:doc:`profiler log message </tutorial/manage-the-database-profiler>`.
5+
:ref:`profiler log message <database-profiler>`.

source/reference/command/connectionStatus.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ field:
6666

6767
- Optional. Set ``showPrivileges`` to true to instruct
6868
:dbcommand:`connectionStatus` to return the full set of
69-
:doc:`privileges </reference/privilege-actions>` that
69+
:ref:`privileges <security-user-actions>` that
7070
currently-authenticated users possess.
7171

7272
By default, this field is ``false``.

source/reference/command/planCacheSetFilter.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ The command has the following fields:
107107
]``.
108108
- Index names. For example, ``[ "x_1", ... ]``.
109109

110-
The :doc:`query optimizer </core/query-plans>` uses either a
110+
The :ref:`query optimizer <read-operations-query-optimization>` uses either a
111111
collection scan or the index arrays for the query plan. If the
112112
specified indexes do not exist or are :doc:`hidden
113113
</core/index-hidden>`, the optimizer uses a collection scan.

source/reference/command/refineCollectionShardKey.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ The command takes the following fields:
109109

110110
For the suffix fields, set the field values to either:
111111

112-
- ``1`` for :doc:`ranged based sharding </core/ranged-sharding>`
112+
- ``1`` for :ref:`range-based sharding <sharding-ranged>`
113113

114114
- ``"hashed"`` to specify a :ref:`hashed shard key
115115
<hashed-shard-keys>` *if* no other field in the shard key has

source/reference/command/reshardCollection.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ The command takes the following fields:
8989

9090
Set the field values to either:
9191

92-
- ``1`` for :doc:`ranged based sharding </core/ranged-sharding>`
92+
- ``1`` for :ref:`range-based sharding <sharding-ranged>`
9393

9494
- ``"hashed"`` to specify a
9595
:ref:`hashed shard key <hashed-shard-keys>`.

source/reference/command/shardCollection.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ The command takes the following fields:
9292

9393
Set the field values to either:
9494

95-
- ``1`` for :doc:`ranged based sharding </core/ranged-sharding>`
95+
- ``1`` for :ref:`range-based sharding <sharding-ranged>`
9696

9797
- ``"hashed"`` to specify a
9898
:ref:`hashed shard key <hashed-shard-keys>`.

source/reference/explain-results.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ documentation for that version.
144144
~~~~~~~~~~~~~~~~
145145

146146
:data:`explain.queryPlanner` information details the plan selected by
147-
the :doc:`query optimizer </core/query-plans>`.
147+
the :ref:`query optimizer <read-operations-query-optimization>`.
148148

149149
These examples may combine the output structures of MongoDB's classic
150150
and slot-based execution engines. They are not meant to be
@@ -238,7 +238,7 @@ representative. Your output may differ significantly.
238238
.. data:: explain.queryPlanner
239239

240240
Contains information on the selection of the query plan by the
241-
:doc:`query optimizer </core/query-plans>`.
241+
:ref:`query optimizer <read-operations-query-optimization>`.
242242

243243
.. data:: explain.queryPlanner.namespace
244244

source/reference/glossary.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ Glossary
121121
operations.
122122

123123
bounded collection scan
124-
A plan used by the :doc:`query optimizer </core/query-plans>` that
124+
A plan used by the :ref:`query optimizer <read-operations-query-optimization>` that
125125
excludes documents with specific field value ranges. For
126126
example, if a range of date field values is outside of a specified
127127
date range, the documents in that range are excluded from the

source/reference/method/Mongo.setReadPref.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ Parameters
8585
Hedged reads are available for sharded clusters. To use hedged reads,
8686
the :binary:`~bin.mongos` must have :parameter:`enabled support
8787
<readHedgingMode>` for hedged reads (the default) and the
88-
non-``primary`` :doc:`read preferences </core/read-preference>` must
88+
non-``primary`` :ref:`read preference <read-preference>` must
8989
enable the use of hedged reads.
9090

9191
Read preference :readmode:`nearest` enables the use of hedged
@@ -170,7 +170,7 @@ Specify Hedged Read
170170
~~~~~~~~~~~~~~~~~~~
171171

172172
For sharded clusters, you can enable :ref:`hedged reads <mongos-hedged-reads>`
173-
for non-primary :doc:`read preferences </core/read-preference>`. To use hedged
173+
for non-primary :ref:`read preferences <read-preference>`. To use hedged
174174
reads, the :binary:`~bin.mongos` must have :parameter:`enabled support
175175
<readHedgingMode>` for hedged reads (the default) and the
176176
non-``primary`` :ref:`read preferences <read-preference>` must

source/reference/method/cursor.hint.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Definition
2222

2323

2424
Call this method on a query to override MongoDB's default index
25-
selection and :doc:`query optimization process </core/query-plans>`.
25+
selection and :ref:`query optimization process <read-operations-query-optimization>`.
2626
Use :method:`db.collection.getIndexes()` to return the list of
2727
current indexes on a collection.
2828

source/reference/method/cursor.readPref.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ Specify Hedged Read
150150
~~~~~~~~~~~~~~~~~~~
151151

152152
For sharded clusters, you can enable :ref:`hedged reads <mongos-hedged-reads>`
153-
for non-primary :doc:`read preferences </core/read-preference>`. To use hedged
153+
for non-primary :ref:`read preference <read-preference>`. To use hedged
154154
reads, the :binary:`~bin.mongos` must have :parameter:`enabled support
155155
<readHedgingMode>` for hedged reads (the default) and the
156156
non-``primary`` :ref:`read preferences <read-preference>` must

source/reference/method/db.collection.find.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ cursor handling mechanism for the :driver:`driver language
158158
Read Concern
159159
~~~~~~~~~~~~
160160

161-
To specify the :doc:`read concern </reference/read-concern>` for
161+
To specify the :ref:`read concern <read-concern>` for
162162
:method:`db.collection.find()`, use the :method:`cursor.readConcern()`
163163
method.
164164

source/reference/method/rs.add.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ Add a Priority 0 Member to a Replica Set
148148

149149
The following operation adds a :binary:`~bin.mongod` instance, running on
150150
the host ``mongodb4.example.net`` and accessible on the default port
151-
``27017``, as a :doc:`priority 0 </core/replica-set-priority-0-member>`
151+
``27017``, as a :ref:`priority 0 <replica-set-secondary-only-members>`
152152
secondary member:
153153

154154
.. code-block:: javascript

source/reference/method/sh.reshardCollection.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ Definition
5151

5252
Set the field values to either:
5353

54-
- ``1`` for :doc:`ranged based sharding </core/ranged-sharding>`
54+
- ``1`` for :ref:`range-based sharding <sharding-ranged>`
5555
- ``"hashed"`` to specify a
5656
:ref:`hashed shard key <hashed-shard-keys>`.
5757

source/reference/method/sh.shardCollection.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ Definition
6464

6565
Set the field value to either:
6666

67-
- ``1`` for :doc:`ranged based sharding </core/ranged-sharding>`
67+
- ``1`` for :ref:`range-based sharding <sharding-ranged>`
6868

6969
- ``"hashed"`` to specify a
7070
:ref:`hashed shard key <hashed-shard-keys>`.

source/reference/mongodb-defaults.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Read Concern
2929
Default Read Concern
3030
~~~~~~~~~~~~~~~~~~~~
3131

32-
The :red:`default` :doc:`read concern </reference/read-concern>` is as
32+
The :red:`default` :ref:`read concern <read-concern>` is as
3333
follows:
3434

3535
.. list-table::
@@ -86,7 +86,7 @@ Specify Read Concern: MongoDB Drivers
8686
Transactions`` tab.
8787

8888
Using the :driver:`MongoDB drivers </>`, you can override the default
89-
:doc:`read concern </reference/read-concern>` and set read concern for operations
89+
:ref:`read concern <read-concern>` and set read concern for operations
9090
at the following levels:
9191

9292
.. list-table::

source/release-notes/4.2.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2059,7 +2059,7 @@ see :doc:`/core/query-plans`.
20592059

20602060
- The ``queryHash`` and ``planCacheKey`` are available in:
20612061

2062-
- :doc:`profiler entry </tutorial/manage-the-database-profiler>`
2062+
- :ref:`profiler entry <database-profiler>`
20632063
fields :data:`~system.profile.queryHash` and
20642064
:data:`~system.profile.planCacheKey` the logged query operations.
20652065

source/tutorial/evaluate-operation-performance.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ Starting in MongoDB 4.2, the explain output includes:
5959
with the same :term:`query shape`.
6060

6161
- :data:`~explain.queryPlanner.planCacheKey` to provide more insight
62-
into the :doc:`query plan cache </core/query-plans>` for slow queries.
62+
into the :ref:`query plan cache <read-operations-query-optimization>` for slow queries.
6363

6464

6565
For more information, see :doc:`/reference/explain-results`,

0 commit comments

Comments
 (0)