Skip to content

Commit a54b191

Browse files
authored
DOCS-15553 add queryFramework info (#1866)
* 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 2ff56c5 commit a54b191

File tree

4 files changed

+29
-11
lines changed

4 files changed

+29
-11
lines changed

source/reference/command/serverStatus.txt

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

2029+
.. serverstatus:: query.queryFramework.aggregate
2030+
2031+
A document that reports on the number of aggregation operations run on each
2032+
:term:`query framework`. The subfields in ``query.queryFramework.aggregate``
2033+
indicate the number of times each framework was used to perform an
2034+
aggregation operation.
2035+
2036+
.. serverstatus:: query.queryFramework.find
2037+
2038+
A document that reports on the number of find operations run on each
2039+
:term:`query framework`. The subfields in ``query.queryFramework.find``
2040+
indicate the number of times each framework was used to perform a find
2041+
operation.
2042+
20292043
.. serverstatus:: metrics.queryExecutor
20302044

20312045
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
@@ -81,6 +81,7 @@ operations on a standalone:
8181
"nreturned" : 101,
8282
"queryHash" : "811451DD",
8383
"planCacheKey" : "759981BA",
84+
"queryFramework" : "classic",
8485
"locks" : {
8586
"Global" : {
8687
"acquireCount" : {
@@ -469,6 +470,10 @@ operation.
469470

470471
.. versionadded:: 4.2
471472

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

474479
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
@@ -853,6 +853,10 @@ Glossary
853853
:method:`db.collection.findOne()` methods. See
854854
:ref:`read-operations-queries`.
855855

856+
query framework
857+
A combination of the :term:`query optimizer` and query execution engine
858+
used to process an operation.
859+
856860
query optimizer
857861
A process that generates query plans. For each query, the
858862
optimizer generates a plan that matches the query to the index

source/reference/log-messages.txt

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1010,17 +1010,8 @@ Starting in MongoDB 5.0, :ref:`slow operation
10101010
<database-profiling-specify-slowms-threshold>` log messages include a
10111011
``remote`` field specifying client IP address.
10121012

1013-
The following example output includes information about
1014-
a slow :doc:`aggregation </aggregation>` operation:
1015-
1016-
.. code-block:: javascript
1017-
:copyable: false
1018-
1019-
{"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}}
1020-
1021-
See the :ref:`examples section <log-message-json-examples>` for a
1022-
:ref:`pretty-printed <log-message-pretty-printing>` version of this log
1023-
entry.
1013+
To see an example of a slow :ref:`aggregation <aggregation-pipeline>` operation
1014+
log entry, see :ref:`log-message-json-examples-slow-op`.
10241015

10251016
.. _log-messages-remoteOpWaitMillis:
10261017

@@ -1338,6 +1329,8 @@ This example shows a client connection that includes
13381329
}
13391330
}
13401331

1332+
.. _log-message-json-examples-slow-op:
1333+
13411334
Slow Operation
13421335
~~~~~~~~~~~~~~
13431336

@@ -1416,6 +1409,7 @@ This example shows a :ref:`slow operation message
14161409
"usedDisk": true,
14171410
"numYields": 1002,
14181411
"nreturned": 101,
1412+
"queryFramework": "classic"
14191413
"reslen": 17738,
14201414
"locks": {
14211415
"ReplicationStateTransition": {
@@ -1553,6 +1547,7 @@ The following example log message contains a ``resolvedViews`` field for
15531547
"nreturned": 1,
15541548
"queryHash": "3344645B",
15551549
"planCacheKey": "1D3DE690",
1550+
"queryFramework": "classic"
15561551
"reslen": 134,
15571552
"locks": { "ParallelBatchWriterMode": { "acquireCount": { "r": 1 } },
15581553
"ReplicationStateTransition": { "acquireCount": { "w": 1 } },

0 commit comments

Comments
 (0)