[SERVER-12796] Consider not caching plans if all candidates are equally unproductive Created: 19/Feb/14  Updated: 11/Jul/16  Resolved: 25/Feb/14

Status: Closed
Project: Core Server
Component/s: Querying
Affects Version/s: 2.5.5
Fix Version/s: 2.6.0-rc1

Type: Improvement Priority: Minor - P4
Reporter: David Storch Assignee: David Storch
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:

 Description   

If none of the candidate plans produce or hit EOF while picking the best plan, then we currently choose a plan arbitrarily and cache it. We should consider not caching the plan in this case, since we don't have much information suggesting that it is better than the other candidates.



 Comments   
Comment by Githook User [ 25/Feb/14 ]

Author:

{u'username': u'dstorch', u'name': u'David Storch', u'email': u'david.storch@10gen.com'}

Message: SERVER-12796 SERVER-12829 SERVER-12830 better plan ranking in the case of EOF or zero results produced

If the winning plan returns zero results but does not hit EOF, then we no longer cache it.

Fixes a bug which would allow plans that did not hit EOF in the multi plan runner to be chosen over EOF plans.
Branch: master
https://github.com/mongodb/mongo/commit/8bf16f9e54e61a6befa791a6378ffdd06ad35a5b

Generated at Thu Feb 08 03:29:38 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.