-
Type: Sub-task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Fully Compatible
-
QE 2023-05-15
IDHACK plans do not need to be cached, and so do not require a plan cache key. Currently we create the key every time whether it's needed or not, for every query. In v5.0 we avoided creating the plan cache key unless it was needed, and we can do that again to save some cycles.
indexEntryFromIndexCatalogEntry() can also be sped up by avoiding (among other things) checking for multikeyPaths when converting an Id index. Multikey checks require taking locks and other things that are expensive if not needed.
See src/mongo/db/query/get_executor.cpp for both.