Working with actual execution plan
The actual execution plan is one of the most important features provided by SQL Server, as it tells us how the query has actually performed. We can find the bottleneck in query, if any, and find out the way to resolve it.
Getting ready
In the previous recipe, Working with estimated execution plan, we have already discussed about the importance of estimated execution plan, which shows how your query should be processed, with the way it should get executed.
Most of the time, your query runs exactly in the same way as it has been mentioned in estimated execution plan. But, what if you find that your execution plan is perfect and still your query execution seems slow? Well, in that case the actual execution plan comes into picture.
Execute your query with actual execution plan and see whether it is following the ways we saw in estimated execution plan. In most cases, both the plans should be the same (except that the estimated execution plan is based on sampling...