Operational Defect Database

BugZero found this defect 46 days ago.

MongoDB | 2631451

Explain for classic multi planner displays incorrect skip amount

Last update date:

4/3/2024

Affected products:

MongoDB Server

Affected releases:

8.0.0-rc0

Fixed releases:

No fixed releases provided.

Description:

Info

db.test.drop(); for (let i = 0; i < 10; ++i) { db.test.insertOne({a: 1, b: 1}); } db.test.createIndex({a: 1}); db.test.createIndex({b: 1});  // Observe 0 in skipAmount print(db.test.find({a: 1, b: 1}).sort({_id: 1}).limit(5).skip(5).explain().queryPlanner.winningPlan); // Same query with hint (so without multiplanning) will show correct amount print(db.test.find({a: 1, b: 1}).sort({_id: 1}).limit(5).skip(5).hint({_id: 1}).explain().queryPlanner.winningPlan);

Top User Comments


Steps to Reproduce


Additional Resources / Links

Share:

BugZero® Risk Score

What's this?

Coming soon

Status

Needs Scheduling

Learn More

Search:

...