When writing stored procedures or writing complex queries it is pretty much a standard thing to do is the use of execution plans. The execution plans point to how the query is being executed, what kind of indexes are being used etc. In SQL Server 2008, there is an option called Include Execution plan which can be set prior to the execution of a query or a stored procedure. In SSMS this option can be found under the Query Menu option, the Keyboard shortcut is Ctr+M.
Once the query is executed, the execution plan can be see in the results window, one of the neat features in 2008 is that it points out where indexes are missing and gives recommendation on the kind of indexes that need to be created on a table in order to improve query performance.
In the execution plan, one has the option to save the plan as a .sqlplan file, also the query where the missing indexes are recommended can be edited in a new query window.
Post a Comment