Inspect planner and runtime behavior.
Section: Verify with explain
Explain a query with execution stats
javascript
javascript
db.orders.find({ tenantId: 7, status: "paid" }).sort({ createdAt: -1 }).explain("executionStats")Explanation
Check keys examined, docs examined, winning plan, and whether the compound index is actually used.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Verify with explain
Multikey index on an array field
Index documents that contain array values.
Wildcard index
Support flexible queries on unknown or varying fields.