-
Type: Improvement
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: Backlog
-
Component/s: None
-
None
-
Fully Compatible
-
QO 2022-03-07, QO 2022-03-21
-
15
Currently when we construct an WhereMatchExpression we instantiate a JsFunction object, which is a wrapper encapsulating common logic for running JS code in $where expression.
When we translate this expression into an SBE plan, we make a copy of this JsFunction object, which is an expensive operation, since we re-parse and re-compile the JS function from scratch. Instead, we should reuse the original object stored in WhereMatchExpression since this expression will never need it again once translated into SBE.
- related to
-
SERVER-84152 tassert in expression_where.h
- Closed