Estimated vs Actual Execution Plan
| Estimated Execution Plan | Actual Execution Plan |
|---|---|
| Query is not executed | Query is executed |
| Shows how SQL Server expects to run the query | Shows how SQL Server actually ran the query |
| Contains estimated row counts | Contains both estimated and actual row counts |
Safe for INSERT, UPDATE and DELETE because they are not executed |
Data-changing queries will be executed |
| Useful before running an expensive query | Best for investigating real performance problems |
Important point
A large difference between estimated rows and actual rows may indicate:
-
Outdated statistics
-
Parameter sniffing
-
Data-skew problems
-
Incorrect cardinality estimation
Key point
Use the estimated plan to preview the strategy. Use the actual plan for detailed performance troubleshooting.