Details
-
Bug
-
Resolution: Duplicate
-
Major - P3
-
None
-
3.2.0
-
None
-
ALL
Description
By querying using a ranged regex an additional indexBound is used with the part of the regex until the range begins.
For example:
db.coll.find({ _id: /^1541\/1\/F\/8\/1\/2014\/0[8-9]/ }).explain("executionStats")
|
the indexBounds are:
{
|
"_id" : [
|
"[\"1541/1/F/8/1/2014/0\", \"1541/1/F/8/1/2014/1\")",
|
"[/^1541\\/1\\/F\\/8\\/1\\/2014\\/0[8-9]/, /^1541\\/1\\/F\\/8\\/1\\/2014\\/0[8-9]/]"
|
]
|
}
|
This way it scans a lot more from the index. In this case the _id represents a date prefixed with other info. So the "additional" indexBound will scan all 01 to 09 months.
Attachments
Issue Links
- duplicates
-
SERVER-9938 Inefficient index boundary selected when using character class regex
-
- Backlog
-