Skip to content

Commit 3efec92

Browse files
authored
DOCS-15553 add queryFramework info (#1866) (#6853)
* DOCS-15553 add queryFramework descriptions * cut out detailed sub-fields * add queryFramework to system.profile sample * add description in system.profile * add slow log examples * add queryFramework to slow query run on views * clarify subfields, clean up log examples, alphabetize values * match style guide for references * fix broken ref link * minor changes * fix wording in examples reference * fix wording in examples reference... again * small edits to subfield descriptions * final copy edits + add ref tag to slow oplog example * final final copy edits * [nit] monospacing aggregate and find * edit query engine text * review edits + start glossary entry for queryFramework * insert query framework definition (unfinished) * link query framework glossary entry to other pages * fix typo in server status def * change out doc link for ref * nit edit 'query execution engine' * drop 'query' where needed
1 parent 1e76c20 commit 3efec92

File tree

4 files changed

+29
-16
lines changed

4 files changed

+29
-16
lines changed

source/reference/command/serverStatus.txt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2092,6 +2092,20 @@ metrics
20922092
A histogram measuring the number of plans in the candidate set during
20932093
an invocation of the |sbe-short| multiplanner.
20942094

2095+
.. serverstatus:: query.queryFramework.aggregate
2096+
2097+
A document that reports on the number of aggregation operations run on each
2098+
:term:`query framework`. The subfields in ``query.queryFramework.aggregate``
2099+
indicate the number of times each framework was used to perform an
2100+
aggregation operation.
2101+
2102+
.. serverstatus:: query.queryFramework.find
2103+
2104+
A document that reports on the number of find operations run on each
2105+
:term:`query framework`. The subfields in ``query.queryFramework.find``
2106+
indicate the number of times each framework was used to perform a find
2107+
operation.
2108+
20952109
.. serverstatus:: metrics.queryExecutor
20962110

20972111
A document that reports data from the query execution system.

source/reference/database-profiler.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ operations on a standalone:
8282
"nreturned" : 101,
8383
"queryHash" : "811451DD",
8484
"planCacheKey" : "759981BA",
85+
"queryFramework" : "classic",
8586
"locks" : {
8687
"Global" : {
8788
"acquireCount" : {
@@ -468,6 +469,10 @@ operation.
468469

469470
.. versionadded:: 4.2
470471

472+
.. data:: system.profile.queryFramework
473+
474+
The :term:`query framework` used to process an operation.
475+
471476
.. data:: system.profile.locks
472477

473478
The :data:`system.profile.locks` provides information for various

source/reference/glossary.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -926,6 +926,10 @@ Glossary
926926
:method:`db.collection.findOne()` methods. See
927927
:ref:`read-operations-queries`.
928928

929+
query framework
930+
A combination of the :term:`query optimizer` and query execution engine
931+
used to process an operation.
932+
929933
query operator
930934
A keyword beginning with ``$`` in a query. For example,
931935
:query:`$gt` is the "greater than" operator. For a list of

source/reference/log-messages.txt

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1015,22 +1015,8 @@ Starting in MongoDB 5.0, :ref:`slow operation
10151015
<database-profiling-specify-slowms-threshold>` log messages include a
10161016
``remote`` field specifying client IP address.
10171017

1018-
The following example output includes information about
1019-
a slow :doc:`aggregation </aggregation>` operation:
1020-
1021-
.. code-block:: javascript
1022-
:copyable: false
1023-
1024-
{"t":{"$date":"2020-05-20T20:10:08.731+00:00"},"s":"I", "c":"COMMAND", "id":51803, "ctx":"conn281","msg":"Slow query","attr":{"type":"command","ns":"stocks.trades","appName":"MongoDB Shell","command":{"aggregate":"trades","pipeline":[{"$project":{"ticker":1.0,"price":1.0,"priceGTE110":{"$gte":["$price",110.0]},"_id":0.0}},{"$sort":{"price":-1.0}}],"allowDiskUse":true,"cursor":{},"lsid":{"id":{"$uuid":"fa658f9e-9cd6-42d4-b1c8-c9160fabf2a2"}},"$clusterTime":{"clusterTime":{"$timestamp":{"t":1590005405,"i":1}},"signature":{"hash":{"$binary":{"base64":"AAAAAAAAAAAAAAAAAAAAAAAAAAA=","subType":"0"}},"keyId":0}},"$db":"test"},"planSummary":"COLLSCAN","cursorid":1912190691485054730,"keysExamined":0,"docsExamined":1000001,"hasSortStage":true,"usedDisk":true,"numYields":1002,"nreturned":101,"reslen":17738,"locks":{"ReplicationStateTransition":{"acquireCount":{"w":1119}},"Global":{"acquireCount":{"r":1119}},"Database":{"acquireCount":{"r":1119}},"Collection":{"acquireCount":{"r":1119}},"Mutex":{"acquireCount":{"r":117}}},"storage":{"data":{"bytesRead":232899899,"timeReadingMicros":186017},"timeWaitingMicros":{"cache":849}},"remote": "192.168.14.15:37666","protocol":"op_msg","durationMillis":22427}}
1025-
1026-
.. include:: /includes/fact-totalOplogSlotDurationMicros.rst
1027-
1028-
.. example::
1029-
1030-
.. include:: /includes/fact-totalOplogSlotDurationMicrosExample.rst
1031-
1032-
For a :ref:`pretty-printed <log-message-pretty-printing>` example of a
1033-
slow operation log entry, see :ref:`log-message-json-examples`.
1018+
To see an example of a slow :ref:`aggregation <aggregation-pipeline>` operation
1019+
log entry, see :ref:`log-message-json-examples-slow-op`.
10341020

10351021
.. _log-messages-remoteOpWaitMillis:
10361022

@@ -1354,6 +1340,8 @@ This example shows a client connection that includes
13541340
}
13551341
}
13561342

1343+
.. _log-message-json-examples-slow-op:
1344+
13571345
Slow Operation
13581346
~~~~~~~~~~~~~~
13591347

@@ -1432,6 +1420,7 @@ This example shows a :ref:`slow operation message
14321420
"usedDisk": true,
14331421
"numYields": 1002,
14341422
"nreturned": 101,
1423+
"queryFramework": "classic"
14351424
"reslen": 17738,
14361425
"locks": {
14371426
"ReplicationStateTransition": {
@@ -1569,6 +1558,7 @@ The following example log message contains a ``resolvedViews`` field for
15691558
"nreturned": 1,
15701559
"queryHash": "3344645B",
15711560
"planCacheKey": "1D3DE690",
1561+
"queryFramework": "classic"
15721562
"reslen": 134,
15731563
"locks": { "ParallelBatchWriterMode": { "acquireCount": { "r": 1 } },
15741564
"ReplicationStateTransition": { "acquireCount": { "w": 1 } },

0 commit comments

Comments
 (0)