-
Type: Bug
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Query Optimization
-
Fully Compatible
-
ALL
-
QO 2024-04-29, QO 2024-05-13, QO 2024-05-27, QO 2024-06-10, QO 2024-06-24, QO 2024-07-08
-
200
In the explain output generated by this script, I see duplicate plans being considered.
coll = db.c; coll.drop() coll.insert({t: 1, m: 1, a: 1, b: 1, c: 1, d: 1}) assert.commandWorked(coll.createIndex({m: 1, t: 1})) assert.commandWorked(coll.createIndex({t: 1, m: 1, a: 1})) jsTestLog(coll.explain().aggregate([ {$match: {$and: [{t: {$eq: {c: 1, d: 1}}}, {m: {$eq: {c: 1, d: 1}}}]}}, {$match: {$or: [{t: {$gte: {c: 1, d: 1}}}, {t: {$lte: {c: 1, d: 1}}}]}} ]))
Multiplanning duplicate plans is wasteful. This may be an issue if it's possible to reproduce on more realistic queries
- is related to
-
SERVER-91858 Prevent plan enumerator from generating duplicate solutions
- Backlog