# Explain Plan (Multi-Stage)

{% hint style="info" %}
For the complete, up-to-date explain plan reference (including segment plans, logical plans, and workers plans), see [Explain Plan](https://docs.pinot.apache.org/build-with-pinot/querying-and-sql/multi-stage-query/explain-plan-1) in the multi-stage query section.
{% endhint %}

Multi-stage explain plans are useful when a query uses features such as joins, subqueries, or distributed reshaping that do not exist in the single-stage path.

## What to look for

* logical plan shape
* exchange and distribution boundaries
* join and aggregation placement
* implementation details when you need to see the physical operator chain

If you only need to understand a simple filter or aggregation query, the single-stage explain plan page is usually enough.

## Useful patterns

When debugging multi-stage execution, start by:

1. running `EXPLAIN PLAN FOR`
2. checking whether the plan is logical or implementation-oriented
3. comparing the result with the query options you set

## What this page covered

This page covered what the multi-stage explain plan is useful for and how to approach it when debugging advanced SQL.

## Next step

If you are still deciding between engines, read [SSE vs MSE](https://docs.pinot.apache.org/build-with-pinot/querying-and-sql/sse-vs-mse) in the broader query section.

## Related pages

* [Explain plan](https://docs.pinot.apache.org/build-with-pinot/querying-and-sql/query-execution-controls/explain-plan)
* [Querying Pinot](https://docs.pinot.apache.org/build-with-pinot/querying-and-sql/querying-pinot)
* [SQL syntax](https://docs.pinot.apache.org/build-with-pinot/querying-and-sql/sql-syntax)
