[SERVER-80931] Cache QuerySettings hash, such that it does not have to be recomputed for plan cache lookup Created: 11/Sep/23  Updated: 12/Sep/23

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

Type: Task Priority: Major - P3
Reporter: Denis Grebennicov Assignee: Backlog - Query Execution
Resolution: Unresolved Votes: 0
Labels: M3
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-80937 Avoid linear lookup for allowed index... Backlog
is related to SERVER-79181 Apply QuerySettings for find commands Closed
Assigned Teams:
Query Execution
Participants:

 Description   

As part of SERVER-79181 we introduce QuerySettings into PlanCacheKey. PlanCacheKey has a planCacheKeyHash() method that is used to compute hash of the key.

Now when computing the hash, hash of the QuerySettings is also computed and then later combined and returned.

We could avoid hash computation of QuerySettings as part of the planCacheKeyHash() as its hash can be computed once as part of setQuerySettings, cached in QuerySettingsManager and then later returned as part of the QuerySettings lookup.

This way QuerySettings hash value will be computed only once, which should improve the overall performance on the hot path.


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