<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.sqlserver.org.au/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>Which query is scanning that index?</title><link>http://blogs.sqlserver.org.au/blogs/greg_linwood/archive/2008/04/27/1229.aspx</link><description>SQL 2005's db_dm_index_usage_stats DMV allows DBAs to analyse how often indexes are being used (or not used), including individual counts for seeks, scans &amp;amp; lookups on each index in your database. I was thrilled when I first saw this DMV as there</description><dc:language>en-AU</dc:language><generator>CommunityServer 2.0 (Build: 60217.2664)</generator><item><title>re: Which query is scanning that index?</title><link>http://blogs.sqlserver.org.au/blogs/greg_linwood/archive/2008/04/27/1229.aspx#1230</link><pubDate>Sun, 27 Apr 2008 16:45:10 GMT</pubDate><guid isPermaLink="false">6d5687b6-8fdc-4d13-899b-485dc578ece0:1230</guid><dc:creator>StatisticsIO</dc:creator><description>That is definately cool. I looked around for a way to do it myself and then added a connect item. &lt;a rel="nofollow" target="_new" href="https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=328184"&gt;https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=328184&lt;/a&gt;&lt;br&gt;&lt;br&gt;Please vote.&lt;br&gt;&lt;br&gt;</description></item><item><title>microsoft  &amp;amp;raquo; Blog Archive   &amp;amp;raquo; Which query is scanning that index?</title><link>http://blogs.sqlserver.org.au/blogs/greg_linwood/archive/2008/04/27/1229.aspx#1231</link><pubDate>Sun, 27 Apr 2008 23:23:57 GMT</pubDate><guid isPermaLink="false">6d5687b6-8fdc-4d13-899b-485dc578ece0:1231</guid><dc:creator>Anonymous</dc:creator><description>PingBack from &lt;a rel="nofollow" target="_new" href="http://microsoft-site2008yr.freehostia.com/?p=5895"&gt;http://microsoft-site2008yr.freehostia.com/?p=5895&lt;/a&gt;</description></item><item><title>Greg Linwood</title><link>http://blogs.sqlserver.org.au/blogs/greg_linwood/archive/2008/04/27/1229.aspx#1232</link><pubDate>Sun, 27 Apr 2008 23:44:53 GMT</pubDate><guid isPermaLink="false">6d5687b6-8fdc-4d13-899b-485dc578ece0:1232</guid><dc:creator>Greg_Linwood</dc:creator><description>Hi StatisticsIO&lt;br&gt;&lt;br&gt;Your Connect item talks about matching rows in the missing indexes DMV to that queries that triggered them. &lt;br&gt;&lt;br&gt;UC actually provided an alternative version of this query that does this. Just replace the last few lines of the query I posted with the following code to achieve what you're after..&lt;br&gt;&lt;br&gt; &amp;nbsp;from qp.query_plan.nodes(&lt;br&gt; &amp;nbsp; &amp;nbsp; N'//s:Batch/s:Statements/s:StmtSimple/s:QueryPlan[1]//&lt;br&gt; &amp;nbsp; &amp;nbsp; s:RelOp[@PhysicalOp = (&amp;quot;Index Scan&amp;quot;)]/*[local-name() = (&amp;quot;IndexScan&amp;quot;)]/&lt;br&gt; &amp;nbsp; &amp;nbsp; s:Object[@Database = (&amp;quot;[DBNameHere]&amp;quot;) &lt;br&gt; &amp;nbsp; &amp;nbsp; and @Table = (&amp;quot;[TableNameHere]&amp;quot;) &lt;br&gt; &amp;nbsp; &amp;nbsp; and @Index = (&amp;quot;[IndexNameHere]&amp;quot;)]'&lt;br&gt; &amp;nbsp; &amp;nbsp; ) as ro(relop)&lt;br&gt; &amp;nbsp;) as r&lt;br&gt; &amp;nbsp;where exists(&lt;br&gt; &amp;nbsp; &amp;nbsp; select * &lt;br&gt; &amp;nbsp; &amp;nbsp; from sys.dm_db_missing_index_details as m&lt;br&gt; &amp;nbsp; &amp;nbsp; where m.database_id = db_id(parsename(r.DatabaseRef, 1))&lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; and quotename(object_schema_name(m.object_id, m.database_id)) = r.SchemaRef&lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; and quotename(object_name(m.object_id, m.database_id)) = r.TableRef);&lt;br&gt;</description></item><item><title>Which queries are missing indexes?</title><link>http://blogs.sqlserver.org.au/blogs/greg_linwood/archive/2008/04/27/1229.aspx#1237</link><pubDate>Thu, 08 May 2008 21:06:59 GMT</pubDate><guid isPermaLink="false">6d5687b6-8fdc-4d13-899b-485dc578ece0:1237</guid><dc:creator>Anonymous</dc:creator><description>One of the things I really enjoy when doing performance tuning on 2005 (I still work on a mix of several</description></item><item><title>How earn $ 1000 a week?</title><link>http://blogs.sqlserver.org.au/blogs/greg_linwood/archive/2008/04/27/1229.aspx#1568</link><pubDate>Fri, 05 Mar 2010 18:05:55 GMT</pubDate><guid isPermaLink="false">6d5687b6-8fdc-4d13-899b-485dc578ece0:1568</guid><dc:creator>AleVaserman</dc:creator><description>You can earn from 3000$-5000$ a Month with this program!&lt;br&gt;You will make money from from multiple streams: people search engine, ClickBank, HD Publishing, Google AdSense, HostGator, My Life and GDI (Global Domain International). &lt;br&gt;Visit site: [url=&lt;a rel="nofollow" target="_new" href="http://bit.ly/aLNyID"&gt;http://bit.ly/aLNyID&lt;/a&gt;]acme-people-search.com[/url]</description></item></channel></rss>