[DOCS-15749] [SERVER] Investigate changes in SERVER-69056: 'explain' should include actual resource consumption costs when run with verbosity 'executionStats' Created: 18/Nov/22  Updated: 22/Jan/24

Status: Backlog
Project: Documentation
Component/s: manual, Server
Affects Version/s: None
Fix Version/s: 6.3.0-rc0

Type: Task Priority: Major - P3
Reporter: Backlog - Core Eng Program Management Team Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: backlog, feature, server-docs-bug-bash
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Documented
documents SERVER-69056 'explain' should include actual resou... Closed
Participants:
Days since reply: 1 year, 11 weeks, 5 days ago

 Description   
Original Downstream Change Summary

When explain is run with verbosity executionStats or higher, the "executionStats" now contain "operationMetrics" as well if profileOperationResourceConsumptionMetrics is enabled. These operationMetrics show runtime stats, if they are not zero. The stats are nested within "operationMetrics" which is nested in "executionStats." They include:

"cpuNanos"
"cursorSeeks"
"docBytesRead"
"docBytesWritten"
"docUnitsRead"
"docUnitsReturned"
"docUnitsWritten"
"idxEntryBytesRead"
"idxEntryBytesWritten"
"idxEntryUnitsRead"
"idxEntryUnitsWritten"
"totalUnitsWritten"
"keysSorted"
"sorterSpills"

Description of Linked Ticket

Original title: 'explain' should include estimated resource consumption costs
In order to make it easier for MongoDB users to tally resource consumption costs for Serverless, it would be useful for resource consumption to be returned as part of the 'explain' output.

Example:

test> db.foo.find({}).explain()
{
  explainVersion: '1',
  queryPlanner: {
    namespace: 'test.foo',
    indexFilterSet: false,
    parsedQuery: {},
    queryHash: '17830885',
    planCacheKey: '17830885',
    maxIndexedOrSolutionsReached: false,
    maxIndexedAndSolutionsReached: false,
    maxScansToExplodeReached: false,
    winningPlan: { stage: 'COLLSCAN', direction: 'forward' },
    rejectedPlans: []
  },
  command: { find: 'foo', filter: {}, '$db': 'test' },
  operationMetrics: { docBytesRead: 51, docUnitsRead:2 }



 Comments   
Comment by Education Bot [ 18/Nov/22 ]

Fix Version updated for upstream SERVER-69056:
6.3.0-rc0

Generated at Thu Feb 08 08:13:47 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.