<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>John Sansom - SQL Server DBA in the UK &#187; Dynamic Management Views (DMV)</title>
	<atom:link href="http://www.johnsansom.com/index.php/category/tsql/dynamic-management-views-dmv/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.johnsansom.com</link>
	<description>SQL Server DBA Blog, with straightforward advice, quality resources and musings about SQL Server</description>
	<lastBuildDate>Fri, 03 Sep 2010 13:39:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>How much memory is each SQL Server database using?</title>
		<link>http://www.johnsansom.com/index.php/2010/06/how-much-memory-is-each-sql-server-database-using/</link>
		<comments>http://www.johnsansom.com/index.php/2010/06/how-much-memory-is-each-sql-server-database-using/#comments</comments>
		<pubDate>Fri, 25 Jun 2010 09:11:52 +0000</pubDate>
		<dc:creator>John Sansom</dc:creator>
				<category><![CDATA[Dynamic Management Views (DMV)]]></category>
		<category><![CDATA[SQLServerPedia Syndication]]></category>
		<category><![CDATA[TSQL]]></category>
		<category><![CDATA[DMV]]></category>
		<category><![CDATA[SQL Server memory]]></category>
		<category><![CDATA[SQL Server Tips]]></category>

		<guid isPermaLink="false">http://www.johnsansom.com/?p=2288</guid>
		<description><![CDATA[Whilst perusing the forums over at SQL Server Central today I stumbled across an interesting question regarding how to identify how much memory is being used by SQL Server on a per database level. As you know SQL Server stores database data and index pages in memory in an area know as the Buffer Pool. [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">Whilst perusing the forums over at <a title="SQL Server Central" href="http://www.sqlservercentral.com/Forums/Topic942857-146-1.aspx">SQL Server Central</a> today I stumbled across an interesting question regarding how to identify how much memory is being used by SQL Server on a per database level.</p>
<p style="text-align: justify;">As you know SQL Server stores database data and index pages in memory in an area know as the Buffer Pool. Using my trusty friend Google, I researched an answer to this question on <a title="ServerFault" href="http://serverfault.com/questions/24003/find-out-which-database-in-sql-server-2005-uses-how-much-ram">ServerFault</a> provided by <a title="Paul Randal" href="http://www.sqlskills.com/blogs/paul/">Paul Randal</a>. The solution made use of the SQL Server Dynamic Management View (DMV) <a title="sys.dm_os_buffer_descriptors" href="http://technet.microsoft.com/en-us/library/ms173442.aspx">sys.dm_os_buffer_descriptors</a></p>
<p style="text-align: justify;">As you know I&#8217;m a big fan of using SQL Server DMV&#8217;s and so I wanted to take note of this handy SQL code snippet here in order to share it with you.</p>
<div class="codecolorer-container sql default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="sql codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #993333; font-weight: bold;">SELECT</span><br />
&nbsp; &nbsp;<span style="color: #66cc66;">&#40;</span>CASE WHEN <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#91;</span>is_modified<span style="color: #66cc66;">&#93;</span> <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span> THEN <span style="color: #ff0000;">'Dirty'</span> ELSE <span style="color: #ff0000;">'Clean'</span> END<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> <span style="color: #ff0000;">'Page State'</span><span style="color: #66cc66;">,</span><br />
&nbsp; &nbsp;<span style="color: #66cc66;">&#40;</span>CASE WHEN <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#91;</span>database_id<span style="color: #66cc66;">&#93;</span> <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">32767</span><span style="color: #66cc66;">&#41;</span> THEN <span style="color: #ff0000;">'Resource Database'</span> ELSE DB_NAME <span style="color: #66cc66;">&#40;</span>database_id<span style="color: #66cc66;">&#41;</span> END<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> <span style="color: #ff0000;">'Database Name'</span><span style="color: #66cc66;">,</span><br />
&nbsp; &nbsp;COUNT <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">*</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> <span style="color: #ff0000;">'Page Count'</span><br />
<span style="color: #993333; font-weight: bold;">FROM</span> sys<span style="color: #66cc66;">.</span>dm_os_buffer_descriptors<br />
&nbsp; &nbsp;<span style="color: #993333; font-weight: bold;">GROUP</span> <span style="color: #993333; font-weight: bold;">BY</span> <span style="color: #66cc66;">&#91;</span>database_id<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">,</span> <span style="color: #66cc66;">&#91;</span>is_modified<span style="color: #66cc66;">&#93;</span><br />
&nbsp; &nbsp;<span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> <span style="color: #66cc66;">&#91;</span>database_id<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">,</span> <span style="color: #66cc66;">&#91;</span>is_modified<span style="color: #66cc66;">&#93;</span>;<br />
GO</div></div>
<h2>You may also find interesting&#8230;&#8230;.</h2>
<ul>
<li><a title="How to identify the most costly SQL Server queries using DMV’s  Read more: http://www.johnsansom.com/index.php/2009/05/how-to-identify-the-most-costly-sql-server-queries-using-dmvs/#ixzz0u8SG7k6Z  Under Creative Commons License: Attribution Non-Commercial No Derivatives" href="http://www.johnsansom.com/index.php/2009/05/how-to-identify-the-most-costly-sql-server-queries-using-dmvs/">How to identify the most costly SQL Server queries using DMV’s</a></li>
<li><a title="DMV Query to identify all active SQL Server Sessions" href="http://www.johnsansom.com/index.php/2009/06/dmv-query-to-identify-all-active-sql-server-sessions/">DMV Query to identify all active SQL Server Sessions</a></li>
<li><a title="SQL Snippet: SQL Server Wait Types" href="http://www.johnsansom.com/index.php/2009/12/sql-snippet-wait-types/">SQL Snippet: SQL Server Wait Types</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.johnsansom.com/index.php/2010/06/how-much-memory-is-each-sql-server-database-using/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>SQL Snippet: SQL Server Wait Types</title>
		<link>http://www.johnsansom.com/index.php/2009/12/sql-snippet-wait-types/</link>
		<comments>http://www.johnsansom.com/index.php/2009/12/sql-snippet-wait-types/#comments</comments>
		<pubDate>Tue, 29 Dec 2009 15:52:21 +0000</pubDate>
		<dc:creator>John Sansom</dc:creator>
				<category><![CDATA[Dynamic Management Views (DMV)]]></category>
		<category><![CDATA[SQL Server Tips]]></category>
		<category><![CDATA[SQLServerPedia Syndication]]></category>
		<category><![CDATA[TSQL]]></category>
		<category><![CDATA[DMV]]></category>
		<category><![CDATA[SQLServerWaitTypes]]></category>

		<guid isPermaLink="false">http://www.johnsansom.com/?p=1704</guid>
		<description><![CDATA[Here is a handy little SQL Snippet that will return information about those all important SQL Server Wait Types for your server. It uses the SQL Server Dynamic Management View (DMV) sys.dm_os_wait_stats in order to extrapolate the desired information. A column has also been added to provide details of the percentage of total wait time [...]]]></description>
			<content:encoded><![CDATA[<p>
Here is a handy little SQL Snippet that will return information about those all important SQL Server Wait Types for your server. It uses the SQL Server Dynamic Management View (DMV) <a title="sys.dm_os_wait_stats" href="http://msdn.microsoft.com/en-us/library/ms179984%28SQL.90%29.aspx">sys.dm_os_wait_stats</a> in order to extrapolate the desired information. A column has also been added to provide details of the percentage of total wait time that a particular Wait Type is responsible for.
</p>
<p>
<strong>T-SQL Query to rank SQL Server Wait Types by highest percentage of total wait time</strong>
</p>
<div class="codecolorer-container sql default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="sql codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #993333; font-weight: bold;">SELECT</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; wait_type<span style="color: #66cc66;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; waiting_tasks_count<span style="color: #66cc66;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; max_wait_time_ms<span style="color: #66cc66;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; resource_wait_time_ms &nbsp;<span style="color: #66cc66;">=</span> <span style="color: #66cc66;">&#40;</span>wait_time_ms <span style="color: #66cc66;">-</span> signal_wait_time_ms<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; PercentOfAllResourceWaitTime <span style="color: #66cc66;">=</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#40;</span>cast<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span>wait_time_ms <span style="color: #66cc66;">-</span> signal_wait_time_ms<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> decimal<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">19</span><span style="color: #66cc66;">,</span><span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">/</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#40;</span><span style="color: #993333; font-weight: bold;">SELECT</span> sum<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span>wait_time_ms <span style="color: #66cc66;">-</span> signal_wait_time_ms<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">FROM</span> sys<span style="color: #66cc66;">.</span>dm_os_wait_stats<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">*</span> <span style="color: #cc66cc;">100</span><br />
<span style="color: #993333; font-weight: bold;">FROM</span> sys<span style="color: #66cc66;">.</span>dm_os_wait_stats<br />
<span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> PercentOfAllResourceWaitTime <span style="color: #993333; font-weight: bold;">DESC</span></div></div>
<p>
I hope you find this SQL Snippet useful in your administration of SQL Server. If you have any queries regarding this snippet, SQL Server Wait Types or anything to do with SQL Server whatsoever then be sure to let me know!</p>
<h2>Further Reading</h2>
<ul>
<li>SQL Server Best Practice Article: <a title="SQL Server Best Practice Article: Performance Tuning Wait Queus" href="http://msdn.microsoft.com/en-us/library/cc966413.aspx">Performance Tuning Wait Queues</a></li>
<li>More DMV Queries: <a title="Identify All Active SQL Server Sessions" href="http://www.johnsansom.com/index.php/2009/06/dmv-query-to-identify-all-active-sql-server-sessions/">Identify All Active SQL Server Sessions</a></li>
<li>
How to identify the most <a title="How to identify the most costly SQL Server queries using DMVs" href="http://www.johnsansom.com/index.php/2009/05/how-to-identify-the-most-costly-sql-server-queries-using-dmvs/?preview=true&#038;preview_id=499&#038;preview_nonce=25ddb9893e">costly SQL Server queries</a> using DMV’s
</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.johnsansom.com/index.php/2009/12/sql-snippet-wait-types/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>DMV Query to identify all active SQL Server Sessions</title>
		<link>http://www.johnsansom.com/index.php/2009/06/dmv-query-to-identify-all-active-sql-server-sessions/</link>
		<comments>http://www.johnsansom.com/index.php/2009/06/dmv-query-to-identify-all-active-sql-server-sessions/#comments</comments>
		<pubDate>Wed, 03 Jun 2009 00:24:09 +0000</pubDate>
		<dc:creator>John Sansom</dc:creator>
				<category><![CDATA[Dynamic Management Views (DMV)]]></category>
		<category><![CDATA[SQL Server Tips]]></category>
		<category><![CDATA[SQLServerPedia Syndication]]></category>
		<category><![CDATA[TSQL]]></category>
		<category><![CDATA[DMV]]></category>
		<category><![CDATA[Identify Active Sessions]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://www.johnsansom.com/?p=563</guid>
		<description><![CDATA[You may already be aware that I am a big advocate of the SQL Server Dynamic Management Views (DMV&#8217;s) and the benifits that they bring to the Database Administrator. They certainly came in handy with a requirement I had recently whereby I needed to identify the IP Address of a specific SQL Server Login and [...]]]></description>
			<content:encoded><![CDATA[<p>You may already be aware that I am a big advocate of the SQL Server Dynamic Management Views (DMV&#8217;s)  and the benifits that they bring to the Database Administrator. They certainly came in handy with a requirement I had recently whereby I needed to identify the IP Address of a specific SQL Server Login and so I would like to share my solution with you.</p>
<p>The query below identifies all currently active SQL Server user connections by their SQL Server Login name. It provides details of the IP address that the connection is sourced from, along with the number of sessions and connections that the SQL Server Login is currently responsible for.</p>
<pre class="sql">SELECT
    B.login_name,
    A.client_net_address,
    NoOfConnections = COUNT(*)
FROM
    sys.dm_exec_connections A
		INNER JOIN sys.dm_exec_sessions B ON
			A.session_id = B.session_id
GROUP BY
    login_name,
    client_net_address</pre>
<p>This is achieved by using two of SQL Server DMV&#8217;s:</p>
<ul>
<li><a title="sys.dm_exec_sessions" href="http://msdn.microsoft.com/en-us/library/ms176013.aspx">sys.dm_exec_connections</a></li>
<li><a title="sys.dm_exec_sessions" href="http://msdn.microsoft.com/en-us/library/ms176013.aspx">sys.dm_exec_sessions</a></li>
</ul>
<p><script src="js/shCore.js"></script> <script src="js/shBrushCSharp.js"></script><br />
<script src="js/shBrushXml.js"></script> <script type="text/javascript">// <![CDATA[
dp.SyntaxHighlighter.ClipboardSwf = '/flash/clipboard.swf';
dp.SyntaxHighlighter.HighlightAll('code');
// ]]&gt;</script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.johnsansom.com/index.php/2009/06/dmv-query-to-identify-all-active-sql-server-sessions/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>How to identify the most costly SQL Server queries using DMV&#8217;s</title>
		<link>http://www.johnsansom.com/index.php/2009/05/how-to-identify-the-most-costly-sql-server-queries-using-dmvs/</link>
		<comments>http://www.johnsansom.com/index.php/2009/05/how-to-identify-the-most-costly-sql-server-queries-using-dmvs/#comments</comments>
		<pubDate>Fri, 15 May 2009 12:04:00 +0000</pubDate>
		<dc:creator>John Sansom</dc:creator>
				<category><![CDATA[Dynamic Management Views (DMV)]]></category>
		<category><![CDATA[Performance Tuning]]></category>
		<category><![CDATA[SQL Server Tips]]></category>
		<category><![CDATA[TSQL]]></category>
		<category><![CDATA[CPU]]></category>
		<category><![CDATA[DMV]]></category>
		<category><![CDATA[identify expensive queries]]></category>
		<category><![CDATA[identify slow running query]]></category>
		<category><![CDATA[query tuning]]></category>
		<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://www.johnsansom.com/?p=499</guid>
		<description><![CDATA[I was investigating a performance issue recently and so thought I would share the T-SQL query that I created with you. There’s nothing new or magic here, the code snippet simply identifies the top 20 most expensive queries (currently cached) based on the cumulative CPU cost. The query returns both the SQL Text from the [...]]]></description>
			<content:encoded><![CDATA[<p>I was investigating a performance issue recently and so thought I would share the T-SQL query that I created with you.</p>
<p>There’s nothing new or magic here, the code snippet simply identifies the top 20 most expensive queries (currently cached) based on the cumulative CPU cost.</p>
<p>The query returns both the SQL Text from the sys.dm_exec_sql_text DMV and the XML Showplan data from the sys.dm_exec_query_plan DMV.</p>
<h3><strong>T-SQL to identify the Top 20 most costly queries in terms of Total CPU</strong></h3>
<div class="codecolorer-container sql default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="sql codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #993333; font-weight: bold;">SELECT</span> TOP <span style="color: #cc66cc;">20</span><br />
&nbsp; &nbsp; qs<span style="color: #66cc66;">.</span>sql_handle<span style="color: #66cc66;">,</span><br />
&nbsp; &nbsp; qs<span style="color: #66cc66;">.</span>execution_count<span style="color: #66cc66;">,</span><br />
&nbsp; &nbsp; qs<span style="color: #66cc66;">.</span>total_worker_time <span style="color: #993333; font-weight: bold;">AS</span> Total_CPU<span style="color: #66cc66;">,</span><br />
&nbsp; &nbsp; total_CPU_inSeconds <span style="color: #66cc66;">=</span> <span style="color: #808080; font-style: italic;">--Converted from microseconds</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; qs<span style="color: #66cc66;">.</span>total_worker_time<span style="color: #66cc66;">/</span><span style="color: #cc66cc;">1000000</span><span style="color: #66cc66;">,</span><br />
&nbsp; &nbsp; average_CPU_inSeconds <span style="color: #66cc66;">=</span> <span style="color: #808080; font-style: italic;">--Converted from microseconds</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#40;</span>qs<span style="color: #66cc66;">.</span>total_worker_time<span style="color: #66cc66;">/</span><span style="color: #cc66cc;">1000000</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">/</span> qs<span style="color: #66cc66;">.</span>execution_count<span style="color: #66cc66;">,</span><br />
&nbsp; &nbsp; qs<span style="color: #66cc66;">.</span>total_elapsed_time<span style="color: #66cc66;">,</span><br />
&nbsp; &nbsp; total_elapsed_time_inSeconds <span style="color: #66cc66;">=</span> <span style="color: #808080; font-style: italic;">--Converted from microseconds</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; qs<span style="color: #66cc66;">.</span>total_elapsed_time<span style="color: #66cc66;">/</span><span style="color: #cc66cc;">1000000</span><span style="color: #66cc66;">,</span><br />
&nbsp; &nbsp;st<span style="color: #66cc66;">.</span>text<span style="color: #66cc66;">,</span><br />
&nbsp; &nbsp;qp<span style="color: #66cc66;">.</span>query_plan<br />
<span style="color: #993333; font-weight: bold;">FROM</span><br />
&nbsp; &nbsp; sys<span style="color: #66cc66;">.</span>dm_exec_query_stats <span style="color: #993333; font-weight: bold;">AS</span> qs<br />
&nbsp; &nbsp; <span style="color: #993333; font-weight: bold;">CROSS</span> APPLY sys<span style="color: #66cc66;">.</span>dm_exec_sql_text<span style="color: #66cc66;">&#40;</span>qs<span style="color: #66cc66;">.</span>sql_handle<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> st<br />
&nbsp; &nbsp; <span style="color: #993333; font-weight: bold;">CROSS</span> apply sys<span style="color: #66cc66;">.</span>dm_exec_query_plan <span style="color: #66cc66;">&#40;</span>qs<span style="color: #66cc66;">.</span>plan_handle<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> qp<br />
<span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> qs<span style="color: #66cc66;">.</span>total_worker_time <span style="color: #993333; font-weight: bold;">DESC</span></div></div>
<h3><strong>Dynamic Management Views (DMV&#8217;s) Used</strong></h3>
<ul>
<li>sys.dm_exec_query_stats
<ul>
<li>Returns performance statistics for cached query plans. This contains one row per query plan so if a stored procedure or batch contains two SELECT statements you may get two rows here</li>
</ul>
</li>
</ul>
<ul>
<li>sys.dm_exec_sql_text
<ul>
<li>Returns the text of the sql statement based on the SQL handle</li>
</ul>
</li>
</ul>
<ul>
<li>sys.dm_exec_query_plan
<ul>
<li>Returns the showplan in XML format for a batch or module based on the plan handle</li>
</ul>
</li>
</ul>
<h3><strong>Reviewing the results</strong></h3>
<p>If you want to investigate a specific query plan further, you may view the graphical execution plan of a particular query by completing the following steps.</p>
<ol>
<li>Click the hyperlink in the query_plan column for the appropriate row. This will open the XMLShowplan data into a new tab within SQL Server Management Studio.</li>
<li> Save the document by using the Save As option.</li>
<li>Choose the &#8220;All File(*.*) fily type option and type .sqlplan as the file extension.</li>
<li>Close the XML document.</li>
<li>Open the file with the .sqlplan extension.</li>
</ol>
<p>For more comprehensive instruction, see the reference below &#8220;How to: Save an Execution Plan in XML Format&#8221;.</p>
<h3><strong>Useful References</strong></h3>
<ul>
<li><a title="How to:Save an Execution Plan in XML Format" href="http://technet.microsoft.com/en-us/library/ms190646(SQL.90).aspx">How to: Save an Execution Plan in XML Format</a></li>
<li><a href="http://blogs.msdn.com/sqltips/archive/2005/10/05/Top-N-costly-query-plans.aspx">Find Top N costly query plans in adhoc batches or modules&#8230;</a></li>
</ul>
<h3>Related Posts</h3>
<ul>
<li><a title="SQL Snippet: SQL Server Wait Types" href="http://www.johnsansom.com/index.php/2009/12/sql-snippet-wait-types/">SQL Snippet: SQL Server Wait Types</a></li>
<li><a title="DMV Query to identify all active SQL Server Sessions" href="http://www.johnsansom.com/index.php/2009/06/dmv-query-to-identify-all-active-sql-server-sessions/">DMV Query to identify all active SQL Server Sessions</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.johnsansom.com/index.php/2009/05/how-to-identify-the-most-costly-sql-server-queries-using-dmvs/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
