Estimate Plan vs Actual Plan

Depends on the statistics your database has about your data.

If you see a large differential between the estimated number of rows and the actual number of rows, it can be an indication that SQL Server does not have the proper statistics on the underlying tables and indexes that are used in your query, and it’s choosing a sub-optimal plan.

99% of the time when you look at an estimated plan and an actual plan, you’re going to see the same plan operators and the same what you call shape of the plan which is the order of operations.

Scan vs Seek

A scan is when SQL Server has to scan the data or index pages to find the appropriate records. A scan is the opposite of a seek, where a seek uses the index to pinpoint the records that are needed to satisfy the query.

Usually scans are more expensive than seeks.

XML Version

SQL Server will also generate a XML version of the execution plan. The XML version will contain more information.

Key Lookup

A key lookup is a lookup against the clustered index.

If cost a lot, might think about creating an index.

Sources:

https://www.linkedin.com/learning/sql-server-performance-for-developers/how-to-read-an-execution-plan

Last modified: December 20, 2019

Author

Comments

Write a Reply or Comment