[SERVER-34454] Consider including the EOF bonus in the plan cache score Created: 13/Apr/18  Updated: 29/Oct/23  Resolved: 09/Feb/21

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 4.9.0

Type: Improvement Priority: Major - P3
Reporter: Chris Harris Assignee: Timour Katchaounov
Resolution: Fixed Votes: 0
Labels: neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
Backwards Compatibility: Fully Compatible
Sprint: Query 2021-01-25, Query Optimization 2021-02-22
Participants:
Case:

 Description   

Currently, EOF bonuses are stripped from plan scores prior to being saved in the plan cache. This comment implies that the logic relates to plan eviction. This seems to no longer apply due to the replanning mechanism that was introduced in 3.0.

This may result in getPlansByQuery() output where the first plan listed (the winning/cached plan) has a lower score than subsequent entries.



 Comments   
Comment by Githook User [ 09/Feb/21 ]

Author:

{'name': 'Timour Katchaounov', 'email': 'timour.katchaounov@mongodb.com'}

Message: SERVER-34454 Consider including the EOF bonus in the plan cache score

Removes the subtraction of the eofBonus from the final score,
thus including the eofBonus in the plan cache score.

This is safe to do because the cached score is used only for logging
purposes and no decision is made base on the score outside of
plan_ranker::pickBestPlan
Branch: master
https://github.com/mongodb/mongo/commit/194975733a8289247e972a2d6a2d0e8ffd25bad3

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