# SQL Server Execution Plans: Types and Key Properties
> [!Note]
> Execution plans represent query processing as a tree of physical operators, illustrating data flow and estimated costs to guide optimization.
**SQL Server** supports three distinct **execution plan representations**. **Graphical Plans** are rendered visually in SQL Server Management Studio, displaying operator icons and arrows. **Text Plans** provide an ASCII‐based layout via `SET SHOWPLAN_TEXT ON`, suitable for quick reviews in scripts. **XML Plans** offer a verbose, machine‐readable format that enables detailed programmatic analysis and integration with third‐party tools.
An **execution plan** is structured as a **hierarchical tree** of **physical operators**—for example, [[Index Scan Operator]], **Nested Loops**, or **Hash Match**—where each node corresponds to a concrete database operation. **Parent–child relationships** define the order of execution, and directional **arrows** illustrate the flow of rows between operators. This tree simultaneously captures the logical intent of the query and the precise physical implementation chosen by the optimizer.
Within each operator node, the optimizer embeds several **cost metrics** to evaluate efficiency. The **Estimated I/O Cost** predicts the expected disk read/write overhead, while the **Estimated CPU Cost** forecasts processor cycles required. The **Estimated Number of Rows** represents the cardinality estimate that drives join and aggregation strategies. Finally, the **Estimated Subtree Cost** aggregates the total projected expense of the node and all its descendants, allowing the optimizer to compare alternative plans and select the most cost-effective approach.
---
## References
- Korotkevitch, D. (2022). _SQL Server advanced troubleshooting and performance tuning: Best practices and techniques_. O’Reilly Media.
- Nevarez, B. (2022). _SQL Server query tuning and optimization: Optimize Microsoft SQL Server 2022 queries and applications_. Packt Publishing.