Thursday, January 15, 2015

scans and seeks

Something else I learned about in this talk was execution plans. You may see the execution plan for a swath of SQL by clicking the "Include Actual Execution Plan" icon in SSMS like so:

The icon three to the left is the "Display Estimated Execution Plan" icon and I think it is supposed to have a different effect, but I kept just falling over to the actual execution plan when I attempted to use it. I'm not yet sure why. Clicking on some of the items in the execution plan should give you details for them like so:

This brings us the difference between scans and seeks. I scan touches every row in a table in the name of finding something. A seek will touch only the applicable rows.

No comments:

Post a Comment