-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Query Execution
Replacing anchored regex ("^string$") with string comparison in the change stream pipeline could yield up to a 7% improvement in our change streams.
However, this approach is not without drawbacks. When we normalize in MatchExpression, predicates are ordered by their type and name, and regex types are evaluated last. Replacing them with string comparison alters this order, which in some cases leads to performance degradation.
We may need to consider disabling MatchExpression normalization to address this issue.
See linked ticket (SERVER-96638) comments for details.
- related to
-
SERVER-96638 [Spike] Investigate if replacing regex with string comparison improves filtering performance in change stream pipeline
- Closed