http://www.sqlservercentral.com/search/?q=query+plan&t=a
List of search results for query plan.
http://www.sqlservercentral.com/articles/Performance+Tuning/obtainingqueryexecutionplansthroughsqlprofilertrac/1830/
“Often clients ask me how they can go about optimizing their stored procedures and during our discussions we usually end up talking about using execution plans to aid in the optimization of those stored procedures. Most of my clients are aware that you can obtain execution plans through Query Analyzer. What most of the clients do not know is that you can utilize SQL Profiler to obtain the execution plans of queries running on a particular system. The problem is once you obtain a SQL Profiler trace file – how do you weed through all the information found that file to just return execution plans and the query associated with that plan.”
Includes a script for setting up SQL Profiler trace. Full script can be found here: create_script.txt. And a script to stop the trace. And a couple of scripts to load the trace results into tables of analysis.
And then a script to pull out the statement for the query plan using the SPID.
http://www.sqlservercentral.com/articles/Performance+Tuning/displayingexecutionplans/1103/
Displaying execution plans for optimisation.
“Execution plans can be viewed in either a graphical or textual format depending on the method used to obtain the execution plan. Query Analyzer and a small group of third-party tools, I personally use mssqlXpress, available at www.xpressapps.com; have the ability to turn the text-based plan into an easily viewed set of icons. From there is a simple matter of understanding the different icons and knowing how to drill down into the icon to retrieve detailed data.
If you do not use Query Analyzer or have a third party tool available, you can use Transact-SQL to display a text-based execution plan. Transact-SQL provides several commands to display execution plans, SET STATISTICS PROFILE, SET STATISTICS IO, SET STATISTICS TIME, SET SHOWPLAN_ALL and SET SHOWPLAN_TEXT. You can one or all of these commands to display a text-based execution plan with various degrees of detailed information associated with that plan.”
“SET SHOWPLAN_ALL – SET SHOWPLAN_ALL will instruct SQL Server not to execute Transact-SQL statements but return detailed information about how the statements will be executed and provides estimates of the resource requirements for the statements.”
or
“Once you have loaded your query or created a call to a stored procedure in the editor plane, click Query on the toolbar and then select Display Estimated Execution Plan. Execute the query and after the query has finished execution, select the Estimated Execution Plan tab to see the graphical execution plan output.”
“SET SHOWPLAN_TEXT – SET SHOWPLAN_ TEXT will instruct SQL Server not to execute Transact-SQL statements but return detailed information about how the statements are executed.”
SET STATISTICS PROFILE ON
SET STATISTICS TIME ON
“SET STATISTICS IO – SET STATISTICS IO instructs SQL Server to display information regarding the amount of disk activity generated by Transact-SQL statements after executing the statement.”