1
- ``readWriteDistribution `` consists of the metrics about the query
1
+ ``readWriteDistribution `` contains metrics about the query
2
2
routing patterns and the :ref: `hotness
3
3
<sharding-troubleshooting-monotonicity>` of shard key ranges. These
4
- metrics are based on sampled queries. You can configure query sampling
5
- for a collection with ``configureQueryAnalyzer ``. These
6
- metrics are only returned when ``readWriteDistribution `` is true. The
7
- metrics are calculated when |analyzeShardKey | is run based on sampled
8
- read and write queries and are not be returned if there are no sampled
9
- queries.
4
+ metrics are based on sampled queries.
5
+
6
+ To configure query sampling for a collection, use the
7
+ ``configureQueryAnalyzer `` command. The read and write distribution
8
+ metrics are only returned if ``readWriteDistribution `` is ``true ``. The
9
+ metrics are calculated when |analyzeShardKey | is run and the metrics use
10
+ the sampled read and write queries. If there are no sampled queries,
11
+ read and write distribution metrics aren't returned.
10
12
11
13
- If there are no sampled read queries, the command returns
12
14
``writeDistribution `` but omits ``readDistribution ``.
13
15
14
16
- If there are no sampled write queries, the command returns
15
17
``readDistribution `` but omits ``writeDistribution ``.
16
18
19
+ .. include :: /includes/analyzeShardKey-read-and-write-distribution-metrics.rst
17
20
18
21
.. list-table ::
19
22
:header-rows: 1
20
23
21
24
* - ``keyCharacteristics `` Value
22
25
- ``readWriteDistribution `` Value
23
- - Behaviors
26
+ - Results Returned
24
27
25
28
* - ``true ``
26
29
- ``false ``
@@ -30,8 +33,8 @@ queries.
30
33
omits :ref: `readWriteDistribution <read-write-distribution-output >`
31
34
metrics.
32
35
33
- - If the shard key does not have a |suppindx |,
34
- |analyzeShardKey | raises an
36
+ - If the shard key doesn't have a |suppindx |,
37
+ |analyzeShardKey | returns an
35
38
``IllegalOperation `` error.
36
39
37
40
* - ``false ``
@@ -45,6 +48,6 @@ queries.
45
48
- |analyzeShardKey | returns both ``readWriteDistribution ``
46
49
metrics and ``keyCharacteristics `` metrics.
47
50
48
- - If the shard key does not have a supporting index,
51
+ - If the shard key doesn't have a supporting index,
49
52
|analyzeShardKey | returns ``readWriteDistribution `` metrics
50
53
and omits ``keyCharacteristics `` metrics.
0 commit comments