-
Type: Improvement
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Query Optimization
-
Fully Compatible
-
v7.0
-
QO 2023-06-12, QO 2023-06-26
-
154
SERVER-75545 imposed a rule that overkills the usage of a compound wildcard index with regular prefix field, especially for $and query. This rule should only apply to $or queries because it’s still a correctness issue that an expanded CWI answering $or query could cause missing documents. The CWI should still be able to provide a bounded plan for $and queries, for example, one very common case - a CWI {a:1, “sub.$**”: 1} should answer both point and range queries like {a:1, “sub.a”: 1}, {a: {$gt: 1}, “sub.c”: {$gt: 1}}.