<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://www2.sqlblog.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>A Warning to Those Using sys.dm_exec_query_stats</title><link>http://www2.sqlblog.com/blogs/adam_machanic/archive/2010/04/22/a-warning-to-those-using-sys-dm-exec-query-stats.aspx</link><description>The sys.dm_exec_query_stats view is one of my favorite DMVs. It has replaced a large chunk of what I used to use SQL Trace for--pulling metrics about what queries are running and how often--and it makes this kind of data collection painless and automatic.</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP2 (Build: 61129.1)</generator><item><title>re: A Warning to Those Using sys.dm_exec_query_stats</title><link>http://www2.sqlblog.com/blogs/adam_machanic/archive/2010/04/22/a-warning-to-those-using-sys-dm-exec-query-stats.aspx#24526</link><pubDate>Fri, 23 Apr 2010 05:50:18 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:24526</guid><dc:creator>merrillaldrich</dc:creator><description>&lt;p&gt;Great tip - thank you&lt;/p&gt;
</description></item><item><title>re: A Warning to Those Using sys.dm_exec_query_stats</title><link>http://www2.sqlblog.com/blogs/adam_machanic/archive/2010/04/22/a-warning-to-those-using-sys-dm-exec-query-stats.aspx#24532</link><pubDate>Fri, 23 Apr 2010 11:53:43 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:24532</guid><dc:creator>Michael J Swart</dc:creator><description>&lt;p&gt;That explains a lot. This week I'm analyzing a migration script (bringing one version of a schema up to another version) and the dmv wasn't it's usual self. There were lots of table-alterin' going on.&lt;/p&gt;
&lt;p&gt;I got better results in my situation with profiler (actually a server trace) and cleartrace.&lt;/p&gt;
</description></item><item><title>re: A Warning to Those Using sys.dm_exec_query_stats</title><link>http://www2.sqlblog.com/blogs/adam_machanic/archive/2010/04/22/a-warning-to-those-using-sys-dm-exec-query-stats.aspx#24534</link><pubDate>Fri, 23 Apr 2010 13:05:39 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:24534</guid><dc:creator>James Luetkehoelter</dc:creator><description>&lt;p&gt;Excellent tip! I thought there were things getting dropped..&lt;/p&gt;
</description></item><item><title>re: A Warning to Those Using sys.dm_exec_query_stats</title><link>http://www2.sqlblog.com/blogs/adam_machanic/archive/2010/04/22/a-warning-to-those-using-sys-dm-exec-query-stats.aspx#24545</link><pubDate>Fri, 23 Apr 2010 17:49:36 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:24545</guid><dc:creator>Ptrick Cahill</dc:creator><description>&lt;p&gt;Very good to know. I have a stored procedure that is not showing up. So I just did a test and I found that you will not get a new row if you open a symmetric key in the procedure. Thanks for the information.&lt;/p&gt;
</description></item><item><title>re: A Warning to Those Using sys.dm_exec_query_stats</title><link>http://www2.sqlblog.com/blogs/adam_machanic/archive/2010/04/22/a-warning-to-those-using-sys-dm-exec-query-stats.aspx#24547</link><pubDate>Fri, 23 Apr 2010 18:41:25 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:24547</guid><dc:creator>Adam Machanic</dc:creator><description>&lt;p&gt;Ptrick, thanks for sharing. &lt;/p&gt;
&lt;p&gt;If anyone else notices similar areas please leave a note; would be great to have all of these (or at least a large number) documented. I can't find any information on this in BOL.&lt;/p&gt;
</description></item><item><title>re: A Warning to Those Using sys.dm_exec_query_stats</title><link>http://www2.sqlblog.com/blogs/adam_machanic/archive/2010/04/22/a-warning-to-those-using-sys-dm-exec-query-stats.aspx#24552</link><pubDate>Sat, 24 Apr 2010 06:24:58 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:24552</guid><dc:creator>Geyzersky Dmitry</dc:creator><description>&lt;p&gt;It is probably related to the way execution plans are cached in memory. Execution plans for procedures containing cryptographic functions won't be cached at all (for security reasons) as far as I'm aware. It explains Ptrick's case with symmetric key. Thanks for a good post.&lt;/p&gt;
</description></item><item><title>re: A Warning to Those Using sys.dm_exec_query_stats</title><link>http://www2.sqlblog.com/blogs/adam_machanic/archive/2010/04/22/a-warning-to-those-using-sys-dm-exec-query-stats.aspx#24569</link><pubDate>Sun, 25 Apr 2010 15:10:40 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:24569</guid><dc:creator>Michael Zilberstein</dc:creator><description>&lt;p&gt;Same thing if you're used to monitor running queries with &lt;/p&gt;
&lt;p&gt;sys.dm_exec_requests er&lt;/p&gt;
&lt;p&gt;CROSS APPLY sys.dm_exec_sql_text(er.[sql_handle]) st&lt;/p&gt;
&lt;p&gt;sys.dm_exec_sql_text doesn't return ALTER TABLE, so you don't see your session using CROSS APPLY (I used CROSS APPLY in order to eliminate system sessions and sessions that do nothing). Actually only [command] column of sys.dm_exec_requests returns &amp;quot;ALTER TABLE&amp;quot;.&lt;/p&gt;
</description></item><item><title>re: A Warning to Those Using sys.dm_exec_query_stats</title><link>http://www2.sqlblog.com/blogs/adam_machanic/archive/2010/04/22/a-warning-to-those-using-sys-dm-exec-query-stats.aspx#24580</link><pubDate>Mon, 26 Apr 2010 15:11:36 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:24580</guid><dc:creator>PatrickCahill</dc:creator><description>&lt;p&gt;I am also seeing the same issue when using the view sys.dm_exec_procedure_stats. &lt;/p&gt;
</description></item><item><title>re: A Warning to Those Using sys.dm_exec_query_stats</title><link>http://www2.sqlblog.com/blogs/adam_machanic/archive/2010/04/22/a-warning-to-those-using-sys-dm-exec-query-stats.aspx#31574</link><pubDate>Mon, 13 Dec 2010 18:39:08 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:31574</guid><dc:creator>Ike Ellis</dc:creator><description>&lt;p&gt;Hi Adam,&lt;/p&gt;
&lt;p&gt;I used this article as the source to prove the same issue exists with SQL Azure. &amp;nbsp;Let me know if that's OK with you (or not). &amp;nbsp;I gave you full credit:&lt;/p&gt;
&lt;p&gt;&amp;lt;a href=&amp;quot;&lt;a rel="nofollow" target="_new" href="http://ellisteam.blogspot.com/2010/12/sql-azure-warning-to-those-using.html&amp;quot;&amp;gt;ellisteam.blogspot.com&amp;lt;/a&amp;gt;"&gt;http://ellisteam.blogspot.com/2010/12/sql-azure-warning-to-those-using.html&amp;quot;&amp;gt;ellisteam.blogspot.com&amp;lt;/a&amp;gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Ike&lt;/p&gt;
</description></item><item><title>re: A Warning to Those Using sys.dm_exec_query_stats</title><link>http://www2.sqlblog.com/blogs/adam_machanic/archive/2010/04/22/a-warning-to-those-using-sys-dm-exec-query-stats.aspx#31575</link><pubDate>Mon, 13 Dec 2010 18:40:01 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:31575</guid><dc:creator>Ike Ellis</dc:creator><description>&lt;p&gt;Comment generator didn't pick up the URL properly. &amp;nbsp;Here it is:&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://ellisteam.blogspot.com/2010/12/sql-azure-warning-to-those-using.html"&gt;http://ellisteam.blogspot.com/2010/12/sql-azure-warning-to-those-using.html&lt;/a&gt;&lt;/p&gt;
</description></item></channel></rss>