[SERVER-56484] SBE explain execution stats include both "nReturned" and "advanced", which duplicate each other Created: 29/Apr/21  Updated: 29/Oct/23  Resolved: 21/May/21

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 5.0.0-rc0, 5.1.0-rc0

Type: Improvement Priority: Major - P3
Reporter: David Storch Assignee: Irina Yatsenko (Inactive)
Resolution: Fixed Votes: 0
Labels: neweng, post-rc0, sbe-post-rc0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Documented
is documented by DOCS-14488 Investigate changes in SERVER-56484: ... Closed
Backwards Compatibility: Fully Compatible
Backport Requested:
v5.0
Sprint: Query Execution 2021-05-31
Participants:

 Description   

When we display the full execution stats associated with an SBE plan in explain, each SBE stage reports both nReturned and advanced. For example:

			"stage" : "nlj",
			"planNodeId" : 1,
			"nReturned" : 3,
			"executionTimeMillisEstimate" : 0,
			"advances" : 3,
			"opens" : 1,
			"closes" : 1,
			"saveState" : 0,
			"restoreState" : 0,
			"isEOF" : 1,
			"innerOpens" : 1,
			"innerCloses" : 1,
			"outerProjects" : [
				NumberLong(4)
			],
			"outerCorrelated" : [
				NumberLong(7),
				NumberLong(8)
			],

This is a nested loop join stage. It has both nReturned and advanced which are both equal to 3. These two fields have the exact same meaning and report the exact same information. We should eliminate this redundancy. Since nReturned is a well-known field name from the format for explainVersion:"1", we should probably deleted advanced and keep reporting this statistic under the field name nReturned.



 Comments   
Comment by Vivian Ge (Inactive) [ 06/Oct/21 ]

Updating the fixversion since branching activities occurred yesterday. This ticket will be in rc0 when it’s been triggered. For more active release information, please keep an eye on #server-release. Thank you!

Comment by Githook User [ 24/May/21 ]

Author:

{'name': 'Irina Yatsenko', 'email': 'irina.yatsenko@mongodb.com', 'username': 'IrinaYatsenko'}

Message: SERVER-56484 Remove 'advances' stats from SBE explain (same stats provided by 'nReturned')

(cherry picked from commit 918e9697af1dd8e6ded16272d15afff80ad947fd)
Branch: v5.0
https://github.com/mongodb/mongo/commit/b5a61bb4682788503b4e4808069754ba5d914b1b

Comment by David Storch [ 24/May/21 ]

Requesting backport to 5.0.

Comment by Githook User [ 21/May/21 ]

Author:

{'name': 'Irina Yatsenko', 'email': 'irina.yatsenko@mongodb.com', 'username': 'IrinaYatsenko'}

Message: SERVER-56484 Remove 'advances' stats from SBE explain (same stats provided by 'nReturned')
Branch: master
https://github.com/mongodb/mongo/commit/918e9697af1dd8e6ded16272d15afff80ad947fd

Generated at Thu Feb 08 05:39:22 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.