Actual vs. Estimated Query Plans in SQL Server

Execution Plan Example

There is only one execution plan stored for your query. The “actual” and “estimated” plans are not different plans, as you might have been told before. It is the same plan in each case, but displayed with or without actual runtime information. The plan is stored in the plan cache, but not the individual runtime information. However, if we request the “actual plan” at the time of execution SQL Server will display the available runtime information with the plan. SQL Server stores aggregated runtime information for cached plans in a Dynamic Management View called sys.dm_exec_query_stats.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s