Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>As gbn points out, there are a number of different ways that you can review the execution plans for queries. Given that your question makes reference to the use of system tables I assume that your are talking about the Dynamic Management Views (DMV's) and that your are therefore also only interested in query plans that are currently in the plan cache.</p> <p>If you are interested in identifying the query plan for a specific query from the plan cache then you can use a query of the form like below:</p> <pre><code>SELECT deqs.plan_handle , deqs.sql_handle , execText.text FROM sys.dm_exec_query_stats deqs CROSS APPLY sys.dm_exec_sql_text(deqs.plan_handle) AS execText WHERE execText.text LIKE '%QueryText%' </code></pre> <p>For further reading, take a look at the article <a href="http://www.simple-talk.com/sql/t-sql-programming/dmvs-for-query-plan-metadata/" rel="nofollow">DMVs for Query Plan Metadata</a></p> <hr> <p>If say you are more interested in reviewing the performance of your most poorly performing queries, that are currently referenced in the plan cache, you can make use of the excellent and freely available <a href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=1d3a4a0d-7e0c-4730-8204-e419218c1efc" rel="nofollow">SQL Server Performance Dashboard Reports.</a></p> <hr> <p>There are of course other methods for viewing query plans but without knowing exactly what it is that you are trying to achieve, these may not be appropriate to your needs.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload