[SERVER-33678] Make regex indexability a factor of query shapes Created: 05/Mar/18  Updated: 29/Oct/23  Resolved: 10/May/18

Status: Closed
Project: Core Server
Component/s: Querying
Affects Version/s: None
Fix Version/s: 4.0.0-rc0

Type: Improvement Priority: Minor - P4
Reporter: Chris Harris Assignee: Ian Boros
Resolution: Fixed Votes: 2
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-66015 Auto-parameterization works incorrect... Closed
is related to SERVER-33511 Same Query Shape with different regex... Closed
Backwards Compatibility: Fully Compatible
Sprint: Query 2018-05-21
Participants:

 Description   

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.



 Comments   
Comment by Githook User [ 10/May/18 ]

Author:

{'name': 'Ian Boros', 'email': 'ian.boros@10gen.com'}

Message: SERVER-33678 make regex options a factor in query shapes
Branch: master
https://github.com/mongodb/mongo/commit/b09ce3bdc6ae82e99576a2530b25a77fe3c72ee1

Comment by David Storch [ 07/Mar/18 ]

Thanks for filing this Chris. It would make sense to have a discriminator in the plan cache key which makes anchored and unanchored regexes act as different query shapes.

Generated at Thu Feb 08 04:34:13 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.