Skip to content

Commit ec6f87d

Browse files
author
Sam Kleinman
committed
sharding: clarification about sorted queries
1 parent d0f4546 commit ec6f87d

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

source/core/sharding-internals.txt

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -184,13 +184,10 @@ compound shard key.
184184
Sorting
185185
```````
186186

187-
If you use the :method:`sort() <cursor.sort()>` method on a query in a
188-
sharded MongoDB environment *and* the sort is on a field that is *not*
189-
part of the shard key, :program:`mongos` must send the query to all
190-
:program:`mongod` instances in the cluster. :program:`mongos` must
191-
wait for a response from every shard before it can merge the results
192-
and return data. If you require high performance sorted queries,
193-
ensure that the sort key is a component of the shard key.
187+
In sharded systems, the :program:`mongos` performs a merge-sort of all
188+
sorted query results from the shards. See the :ref:`sharded query
189+
routing <sharding-query-routing>` and :ref:`index-sort` sections for
190+
more information.
194191

195192
.. _sharding-internals-operations-and-reliability:
196193

source/core/sharding.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ ensuring that your operations include the shard key.
473473
{ c: 1 }
474474
{ b: 1, c: 1 }
475475

476-
.. [#possible-all] :program:`mongos` will round some queries, even
476+
.. [#possible-all] :program:`mongos` will route some queries, even
477477
some that include the shard key, to all shards, if needed.
478478

479479
Sharded Query Response Process

0 commit comments

Comments
 (0)