BugZero found this defect 41 days ago.
Data sources
All data on this page is proprietary to BugZero® or gathered from public sources
4/8/2024
MongoDB Server
No affected releases provided.
No fixed releases provided.
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