Docs Menu
Docs Home
/
MongoDB Compass
/

View Explain Plans for a Pipeline

On this page

  • About this Task
  • Steps
  • Learn More

To help you better understand the performance of your pipeline, you can view your pipeline's explain plan. You can view the explain plan at any point while creating or editing your pipeline.

On the Explain modal, you can view the explain stages as a Visual Tree, where each stage of the pipeline appears as a node on the tree. Alternatively, you can view the explain details in raw JSON format by selecting the Raw Output view.

The explain plan includes a Query Performance Summary with information on the execution of your aggregation pipeline such as:

  • Execution time

  • The number of returned documents

  • The number of examined documents

  • The number of examined index keys

1

In the top right of the aggregation pipeline builder, click the Explain button to open the Explain Plan modal.

Explain button on aggregation pipeline
2

By default, the explain stages are are shown as a Visual Tree. Each stage of the pipeline appears as a node on the tree.

You can click on each stage for more detailed execution information about the stage.

Detailed Visual Tree view
3

To view your full explain plan as raw JSON, select the Raw Output view.

  • Analyze Query Performance

  • View Query Performance

Back

Open a Saved Pipeline

Next

Export Pipeline to Specific Language