Operational Defect Database

BugZero found this defect 41 days ago.

MongoDB | 2635468

Plan enumerator can generate duplicate plans

Last update date:

4/8/2024

Affected products:

MongoDB Server

Affected releases:

No affected releases provided.

Fixed releases:

No fixed releases provided.

Description:

Info

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

Top User Comments


Steps to Reproduce


Additional Resources / Links

Share:

BugZero® Risk Score

What's this?

Coming soon

Status

Needs Scheduling

Learn More

Search:

...