[SERVER-22425] execStats in system.profile reports winning plan and rejected plans Created: 01/Feb/16  Updated: 19/Nov/16  Resolved: 26/Feb/16

Status: Closed
Project: Core Server
Component/s: Diagnostics, Querying
Affects Version/s: 3.2.1, 3.3.1
Fix Version/s: 3.2.4, 3.3.3

Type: Bug Priority: Major - P3
Reporter: David Storch Assignee: James Wahlin
Resolution: Done Votes: 0
Labels: code-only
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-20111 Explain helpers report incorrect plan... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Completed:
Steps To Reproduce:

db.setProfilingLevel(0);
db.system.profile.drop();
db.c.drop();
db.c.ensureIndex({a: 1});
db.c.ensureIndex({b: 1});
db.c.insert({a: 1, b: 1});
db.setProfilingLevel(2);
db.c.find({a: 1, b: 1}).itcount();
db.setProfilingLevel(2);
db.system.profile.find().pretty();

Sprint: Query 10 (02/22/16), Query 11 (03/14/16)
Participants:

 Description   

When profiling is enabled, find operations will add a field called execStats containing some information about the execution of the query plan. In 2.6.x and 3.0.x versions, this contained information about the winning plan only. If the query used the multiplan path, information about the rejected plans was rejected.

This behavior changed in 3.2.0 as a result of 5aefcdd under SERVER-20111. The profile entries now can contain execStats with a MULTI_PLAN stage. All children of the MULTI_PLAN stage are reported, regardless of which child represents the winning plan.



 Comments   
Comment by Githook User [ 26/Feb/16 ]

Author:

{u'username': u'jameswahlin', u'name': u'James Wahlin', u'email': u'james.wahlin@10gen.com'}

Message: SERVER-22425 execStats in system.profile should only report winning plan

(cherry picked from commit e63efab6aa0d0983e99cf2e2fb193a8d481500d3)
Branch: v3.2
https://github.com/mongodb/mongo/commit/0efb73015daca3cbfcdfca3a8e06087bcfed3d6a

Comment by Githook User [ 26/Feb/16 ]

Author:

{u'username': u'jameswahlin', u'name': u'James Wahlin', u'email': u'james.wahlin@10gen.com'}

Message: SERVER-22425 execStats in system.profile should only report winning plan
Branch: master
https://github.com/mongodb/mongo/commit/e63efab6aa0d0983e99cf2e2fb193a8d481500d3

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