The options applied to a regex pattern, such as whether or not it is anchored, impact the query plan that is generated. For example, a left-anchored regex will have tighter index bounds than an unanchored pattern. Such changes yield different performance characteristics.
The present behavior captures these different characteristics in a single query shape. There may be benefits to using regex options as distinguishing aspects of query shapes.
- is related to
-
SERVER-33511 Same Query Shape with different regex can give suboptimal index selection
- Closed
- related to
-
SERVER-66015 Auto-parameterization works incorrectly for indexed regular expression predicates
- Closed