-
Type: Bug
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: 3.6.14
-
Component/s: Index Maintenance, Querying
-
None
-
ALL
-
Hi there,
The problem is that when running a reqex query on a field indexed by a compound index, the IXSCAN stage incorrectly passes all the documents in the collection onto the next FETCH stage, which has to filter them all over again, resulting in a really slow execution of a what had to be a very fast query.
The strange this is that if we alter the regex query with a ^ or & Regular expression restricting character it works correctly.
Also, if you have a single index using the queried field, issuing the same regex query , works as expected.
Please note that the field is first on the compound index, so it should behave as a single one.
Example details given below as steps to reproduce
- duplicates
-
SERVER-29967 The regex filter operation should be applied in the IXSCAN stage if possible
- In Progress