<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.technet.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>Vipul Shah's SQL Blogs : Missing Indexes DMVs</title><link>http://blogs.technet.com/vipulshah/archive/tags/Missing+Indexes+DMVs/default.aspx</link><description>Tags: Missing Indexes DMVs</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Finding Missing Indexes and Unused Indexes using DMVs</title><link>http://blogs.technet.com/vipulshah/archive/2007/12/04/finding-missing-indexes-and-unused-indexes-using-dmvs.aspx</link><pubDate>Wed, 05 Dec 2007 00:25:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:2609045</guid><dc:creator>vishah</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.technet.com/vipulshah/comments/2609045.aspx</comments><wfw:commentRss>http://blogs.technet.com/vipulshah/commentrss.aspx?PostID=2609045</wfw:commentRss><description>&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Finding Missing Indexes:&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;TABLE class=MsoNormalTable style="BACKGROUND: #cccccc; MARGIN: auto auto auto -3.75pt; WIDTH: 101.6%; mso-cellspacing: 0in; mso-yfti-tbllook: 1184; mso-padding-alt: 0in 0in 0in 0in" cellSpacing=0 cellPadding=0 width="101%" border=1 class="MsoNormalTable"&gt;
&lt;TBODY&gt;
&lt;TR style="mso-yfti-irow: 0; mso-yfti-firstrow: yes"&gt;
&lt;TD class="" style="BORDER-RIGHT: #f0f0f0; PADDING-RIGHT: 0in; BORDER-TOP: #f0f0f0; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; BORDER-LEFT: #f0f0f0; PADDING-TOP: 0in; BORDER-BOTTOM: #f0f0f0; BACKGROUND-COLOR: transparent"&gt;
&lt;P class=MsoNormal style="MARGIN: 6pt 0in 3pt 11.35pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="mso-ansi-language: EN-US; mso-fareast-language: EN-US"&gt;Dynamic management object &lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT: #f0f0f0; PADDING-RIGHT: 0in; BORDER-TOP: #f0f0f0; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; BORDER-LEFT: #f0f0f0; PADDING-TOP: 0in; BORDER-BOTTOM: #f0f0f0; BACKGROUND-COLOR: transparent"&gt;
&lt;P class=MsoNormal style="MARGIN: 6pt 0in 3pt 11.35pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="mso-ansi-language: EN-US; mso-fareast-language: EN-US"&gt;Information returned &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR style="mso-yfti-irow: 1"&gt;
&lt;TD class="" style="BORDER-RIGHT: #f0f0f0; PADDING-RIGHT: 0in; BORDER-TOP: #f0f0f0; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; BORDER-LEFT: #f0f0f0; PADDING-TOP: 0in; BORDER-BOTTOM: #f0f0f0; BACKGROUND-COLOR: transparent"&gt;
&lt;P class=MsoNormal style="MARGIN: 6pt 0in 3pt 11.35pt"&gt;&lt;SPAN style="mso-ansi-language: EN-US; mso-fareast-language: EN-US"&gt;sys.dm_db_missing_index_group_stats &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT: #f0f0f0; PADDING-RIGHT: 0in; BORDER-TOP: #f0f0f0; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; BORDER-LEFT: #f0f0f0; PADDING-TOP: 0in; BORDER-BOTTOM: #f0f0f0; BACKGROUND-COLOR: transparent"&gt;
&lt;P class=MsoNormal style="MARGIN: 6pt 0in 3pt 11.35pt"&gt;&lt;SPAN style="mso-ansi-language: EN-US; mso-fareast-language: EN-US"&gt;Returns summary information about missing index groups, for example, the performance improvements that could be gained by implementing a specific group of missing indexes.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR style="mso-yfti-irow: 2"&gt;
&lt;TD class="" style="BORDER-RIGHT: #f0f0f0; PADDING-RIGHT: 0in; BORDER-TOP: #f0f0f0; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; BORDER-LEFT: #f0f0f0; PADDING-TOP: 0in; BORDER-BOTTOM: #f0f0f0; BACKGROUND-COLOR: transparent"&gt;
&lt;P class=MsoNormal style="MARGIN: 6pt 0in 3pt 11.35pt"&gt;&lt;SPAN style="mso-ansi-language: EN-US; mso-fareast-language: EN-US"&gt;sys.dm_db_missing_index_groups &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT: #f0f0f0; PADDING-RIGHT: 0in; BORDER-TOP: #f0f0f0; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; BORDER-LEFT: #f0f0f0; PADDING-TOP: 0in; BORDER-BOTTOM: #f0f0f0; BACKGROUND-COLOR: transparent"&gt;
&lt;P class=MsoNormal style="MARGIN: 6pt 0in 3pt 11.35pt"&gt;&lt;SPAN style="mso-ansi-language: EN-US; mso-fareast-language: EN-US"&gt;Returns information about a specific group of missing indexes, such as the group identifier and the identifiers of all missing indexes that are contained in that group.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR style="mso-yfti-irow: 3"&gt;
&lt;TD class="" style="BORDER-RIGHT: #f0f0f0; PADDING-RIGHT: 0in; BORDER-TOP: #f0f0f0; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; BORDER-LEFT: #f0f0f0; PADDING-TOP: 0in; BORDER-BOTTOM: #f0f0f0; BACKGROUND-COLOR: transparent"&gt;
&lt;P class=MsoNormal style="MARGIN: 6pt 0in 3pt 11.35pt"&gt;&lt;SPAN style="mso-ansi-language: EN-US; mso-fareast-language: EN-US"&gt;sys.dm_db_missing_index_details &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT: #f0f0f0; PADDING-RIGHT: 0in; BORDER-TOP: #f0f0f0; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; BORDER-LEFT: #f0f0f0; PADDING-TOP: 0in; BORDER-BOTTOM: #f0f0f0; BACKGROUND-COLOR: transparent"&gt;
&lt;P class=MsoNormal style="MARGIN: 6pt 0in 3pt 11.35pt"&gt;&lt;SPAN style="mso-ansi-language: EN-US; mso-fareast-language: EN-US"&gt;Returns detailed information about a missing index; for example, it returns the name and identifier of the table where the index is missing, and the columns and column types that should make up the missing index.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR style="mso-yfti-irow: 4"&gt;
&lt;TD class="" style="BORDER-RIGHT: #f0f0f0; PADDING-RIGHT: 0in; BORDER-TOP: #f0f0f0; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; BORDER-LEFT: #f0f0f0; PADDING-TOP: 0in; BORDER-BOTTOM: #f0f0f0; BACKGROUND-COLOR: transparent"&gt;
&lt;P class=MsoNormal style="MARGIN: 6pt 0in 3pt 11.35pt"&gt;&lt;SPAN style="mso-ansi-language: EN-US; mso-fareast-language: EN-US"&gt;sys.dm_db_missing_index_columns &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT: #f0f0f0; PADDING-RIGHT: 0in; BORDER-TOP: #f0f0f0; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; BORDER-LEFT: #f0f0f0; PADDING-TOP: 0in; BORDER-BOTTOM: #f0f0f0; BACKGROUND-COLOR: transparent"&gt;
&lt;P class=MsoNormal style="MARGIN: 6pt 0in 3pt 11.35pt"&gt;&lt;SPAN style="mso-ansi-language: EN-US; mso-fareast-language: EN-US"&gt;Returns information about the database table columns that are missing an index.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR style="mso-yfti-irow: 5"&gt;
&lt;TD class="" style="BORDER-RIGHT: #dedfef 1pt solid; PADDING-RIGHT: 3.75pt; BORDER-TOP: #dedfef 1pt solid; PADDING-LEFT: 3.75pt; BACKGROUND: #d8d8d8; PADDING-BOTTOM: 0in; BORDER-LEFT: #dedfef 1pt solid; PADDING-TOP: 0in; BORDER-BOTTOM: #dedfef 1pt solid; mso-border-alt: solid #DEDFEF .75pt" colSpan=2&gt;
&lt;P class=MsoNormal style="MARGIN: 6pt 0in 3pt 11.35pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="mso-ansi-language: EN-US; mso-fareast-language: EN-US"&gt;Note: &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR style="mso-yfti-irow: 6; mso-yfti-lastrow: yes"&gt;
&lt;TD class="" style="BORDER-RIGHT: #dedfef 1pt solid; PADDING-RIGHT: 3.75pt; BORDER-TOP: #dedfef 1pt solid; PADDING-LEFT: 3.75pt; BACKGROUND: white; PADDING-BOTTOM: 0in; BORDER-LEFT: #dedfef 1pt solid; PADDING-TOP: 0in; BORDER-BOTTOM: #dedfef 1pt solid; mso-border-alt: solid #DEDFEF .75pt" colSpan=2&gt;
&lt;P class=MsoNormal style="MARGIN: 6pt 0in 3pt 11.35pt"&gt;&lt;SPAN style="mso-ansi-language: EN-US; mso-fareast-language: EN-US"&gt;When the metadata for a table changes, all missing index information about that table is deleted from these dynamic management objects. Table metadata changes can occur when columns are added or dropped from a table, for example, or when an index is created on a column of a table.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;
&lt;P class=MsoNormal style="MARGIN: 6pt 0in 3pt 11.35pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN lang=EN-AU&gt;When SQL Server is restarted, all of the missing index information is dropped.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 6pt 0in 3pt 11.35pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="FONT-SIZE: 11pt; LINE-HEIGHT: 110%; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.0pt"&gt;Example using DMVs: &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 6pt 0in 3pt 11.35pt"&gt;&lt;SPAN style="mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'"&gt;Query:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 6pt 0in 3pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"&gt;SELECT&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"&gt; mig&lt;SPAN style="COLOR: gray"&gt;.&lt;/SPAN&gt;index_group_handle&lt;SPAN style="COLOR: gray"&gt;,&lt;/SPAN&gt;mid&lt;SPAN style="COLOR: gray"&gt;.&lt;/SPAN&gt;index_handle&lt;SPAN style="COLOR: gray"&gt;,&lt;/SPAN&gt; migs&lt;SPAN style="COLOR: gray"&gt;.&lt;/SPAN&gt;avg_total_user_cost &lt;SPAN style="COLOR: blue"&gt;as&lt;/SPAN&gt; AvgTotalUserCostThatCouldbeReduced&lt;SPAN style="COLOR: gray"&gt;,&lt;/SPAN&gt; migs&lt;SPAN style="COLOR: gray"&gt;.&lt;/SPAN&gt;avg_user_impact &lt;SPAN style="COLOR: blue"&gt;as&lt;/SPAN&gt; AvgPercentageBenefit&lt;SPAN style="COLOR: gray"&gt;,&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 6pt 0in 3pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: red; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"&gt;'CREATE INDEX missing_index_'&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"&gt; &lt;SPAN style="COLOR: gray"&gt;+&lt;/SPAN&gt; &lt;SPAN style="COLOR: fuchsia"&gt;CONVERT&lt;/SPAN&gt; &lt;SPAN style="COLOR: gray"&gt;(&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;varchar&lt;/SPAN&gt;&lt;SPAN style="COLOR: gray"&gt;,&lt;/SPAN&gt; mig&lt;SPAN style="COLOR: gray"&gt;.&lt;/SPAN&gt;index_group_handle&lt;SPAN style="COLOR: gray"&gt;)&lt;/SPAN&gt; &lt;SPAN style="COLOR: gray"&gt;+&lt;/SPAN&gt; &lt;SPAN style="COLOR: red"&gt;'_'&lt;/SPAN&gt; &lt;SPAN style="COLOR: gray"&gt;+&lt;/SPAN&gt; &lt;SPAN style="COLOR: fuchsia"&gt;CONVERT&lt;/SPAN&gt; &lt;SPAN style="COLOR: gray"&gt;(&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;varchar&lt;/SPAN&gt;&lt;SPAN style="COLOR: gray"&gt;,&lt;/SPAN&gt; mid&lt;SPAN style="COLOR: gray"&gt;.&lt;/SPAN&gt;index_handle&lt;SPAN style="COLOR: gray"&gt;)&lt;/SPAN&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 6pt 0in 3pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: gray"&gt;+&lt;/SPAN&gt; &lt;SPAN style="COLOR: red"&gt;' ON '&lt;/SPAN&gt; &lt;SPAN style="COLOR: gray"&gt;+&lt;/SPAN&gt; mid&lt;SPAN style="COLOR: gray"&gt;.&lt;/SPAN&gt;statement &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 6pt 0in 3pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: gray"&gt;+&lt;/SPAN&gt; &lt;SPAN style="COLOR: red"&gt;' ('&lt;/SPAN&gt; &lt;SPAN style="COLOR: gray"&gt;+&lt;/SPAN&gt; &lt;SPAN style="COLOR: fuchsia"&gt;ISNULL&lt;/SPAN&gt; &lt;SPAN style="COLOR: gray"&gt;(&lt;/SPAN&gt;mid&lt;SPAN style="COLOR: gray"&gt;.&lt;/SPAN&gt;equality_columns&lt;SPAN style="COLOR: gray"&gt;,&lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;''&lt;/SPAN&gt;&lt;SPAN style="COLOR: gray"&gt;)&lt;/SPAN&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 6pt 0in 3pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: gray"&gt;+&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;CASE&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;WHEN&lt;/SPAN&gt; mid&lt;SPAN style="COLOR: gray"&gt;.&lt;/SPAN&gt;equality_columns &lt;SPAN style="COLOR: gray"&gt;IS&lt;/SPAN&gt; &lt;SPAN style="COLOR: gray"&gt;NOT&lt;/SPAN&gt; &lt;SPAN style="COLOR: gray"&gt;NULL&lt;/SPAN&gt; &lt;SPAN style="COLOR: gray"&gt;AND&lt;/SPAN&gt; mid&lt;SPAN style="COLOR: gray"&gt;.&lt;/SPAN&gt;inequality_columns &lt;SPAN style="COLOR: gray"&gt;IS&lt;/SPAN&gt; &lt;SPAN style="COLOR: gray"&gt;NOT&lt;/SPAN&gt; &lt;SPAN style="COLOR: gray"&gt;NULL&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;THEN&lt;/SPAN&gt; &lt;SPAN style="COLOR: red"&gt;','&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;ELSE&lt;/SPAN&gt; &lt;SPAN style="COLOR: red"&gt;''&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;END&lt;/SPAN&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 6pt 0in 3pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: gray"&gt;+&lt;/SPAN&gt; &lt;SPAN style="COLOR: fuchsia"&gt;ISNULL&lt;/SPAN&gt; &lt;SPAN style="COLOR: gray"&gt;(&lt;/SPAN&gt;mid&lt;SPAN style="COLOR: gray"&gt;.&lt;/SPAN&gt;inequality_columns&lt;SPAN style="COLOR: gray"&gt;,&lt;/SPAN&gt; &lt;SPAN style="COLOR: red"&gt;''&lt;/SPAN&gt;&lt;SPAN style="COLOR: gray"&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 6pt 0in 3pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: gray"&gt;+&lt;/SPAN&gt; &lt;SPAN style="COLOR: red"&gt;')'&lt;/SPAN&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 6pt 0in 3pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: gray"&gt;+&lt;/SPAN&gt; &lt;SPAN style="COLOR: fuchsia"&gt;ISNULL&lt;/SPAN&gt; &lt;SPAN style="COLOR: gray"&gt;(&lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;' INCLUDE ('&lt;/SPAN&gt; &lt;SPAN style="COLOR: gray"&gt;+&lt;/SPAN&gt; mid&lt;SPAN style="COLOR: gray"&gt;.&lt;/SPAN&gt;included_columns &lt;SPAN style="COLOR: gray"&gt;+&lt;/SPAN&gt; &lt;SPAN style="COLOR: red"&gt;')'&lt;/SPAN&gt;&lt;SPAN style="COLOR: gray"&gt;,&lt;/SPAN&gt; &lt;SPAN style="COLOR: red"&gt;''&lt;/SPAN&gt;&lt;SPAN style="COLOR: gray"&gt;)&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;AS&lt;/SPAN&gt; create_index_statement &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 6pt 0in 3pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;FROM&lt;/SPAN&gt; &lt;SPAN style="COLOR: green"&gt;sys.dm_db_missing_index_groups&lt;/SPAN&gt; mig&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 6pt 0in 3pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: gray; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"&gt;INNER&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"&gt; &lt;SPAN style="COLOR: gray"&gt;JOIN&lt;/SPAN&gt; &lt;SPAN style="COLOR: green"&gt;sys.dm_db_missing_index_group_stats&lt;/SPAN&gt; migs &lt;SPAN style="COLOR: blue"&gt;ON&lt;/SPAN&gt; migs&lt;SPAN style="COLOR: gray"&gt;.&lt;/SPAN&gt;group_handle &lt;SPAN style="COLOR: gray"&gt;=&lt;/SPAN&gt; mig&lt;SPAN style="COLOR: gray"&gt;.&lt;/SPAN&gt;index_group_handle&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 6pt 0in 3pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: gray; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"&gt;INNER&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"&gt; &lt;SPAN style="COLOR: gray"&gt;JOIN&lt;/SPAN&gt; &lt;SPAN style="COLOR: green"&gt;sys.dm_db_missing_index_details&lt;/SPAN&gt; mid &lt;SPAN style="COLOR: blue"&gt;ON&lt;/SPAN&gt; mig&lt;SPAN style="COLOR: gray"&gt;.&lt;/SPAN&gt;index_handle &lt;SPAN style="COLOR: gray"&gt;=&lt;/SPAN&gt; mid&lt;SPAN style="COLOR: gray"&gt;.&lt;/SPAN&gt;index_handle&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 6pt 0in 3pt 11.35pt"&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: blue; LINE-HEIGHT: 110%; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"&gt;--where&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; LINE-HEIGHT: 110%; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"&gt; &lt;SPAN style="COLOR: blue"&gt;statement&lt;/SPAN&gt; &lt;SPAN style="COLOR: gray"&gt;=&lt;/SPAN&gt; &lt;SPAN style="COLOR: red"&gt;'[&amp;lt;DBName&amp;gt;].[dbo].[&amp;lt;TableName&amp;gt;]'&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; LINE-HEIGHT: 110%; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.0pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Finding Unused Indexes:&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 6pt 0in 3pt 11.35pt"&gt;&lt;SPAN lang=EN-AU&gt;DMVs used: sys.dm_db_index_usage_stats&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 6pt 0in 3pt 11.35pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN lang=EN-AU&gt;Example to find Unused Indexes:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="COLOR: blue; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-fareast-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;select&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-fareast-font-family: 'Times New Roman'; mso-no-proof: yes"&gt; &lt;SPAN style="COLOR: fuchsia"&gt;object_name&lt;/SPAN&gt;&lt;SPAN style="COLOR: gray"&gt;(&lt;/SPAN&gt;i&lt;SPAN style="COLOR: gray"&gt;.&lt;/SPAN&gt;&lt;SPAN style="COLOR: fuchsia"&gt;object_id&lt;/SPAN&gt;&lt;SPAN style="COLOR: gray"&gt;)&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;as&lt;/SPAN&gt; ObjectName&lt;SPAN style="COLOR: gray"&gt;,&lt;/SPAN&gt; i&lt;SPAN style="COLOR: gray"&gt;.&lt;/SPAN&gt;name &lt;SPAN style="COLOR: blue"&gt;as&lt;/SPAN&gt; [Unused Index]&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="COLOR: blue; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-fareast-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;from&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-fareast-font-family: 'Times New Roman'; mso-no-proof: yes"&gt; &lt;SPAN style="COLOR: green"&gt;sys.indexes&lt;/SPAN&gt; i&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="COLOR: gray; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-fareast-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;left&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-fareast-font-family: 'Times New Roman'; mso-no-proof: yes"&gt; &lt;SPAN style="COLOR: gray"&gt;join&lt;/SPAN&gt; &lt;SPAN style="COLOR: green"&gt;sys.dm_db_index_usage_stats&lt;/SPAN&gt; s &lt;SPAN style="COLOR: blue"&gt;on&lt;/SPAN&gt; s&lt;SPAN style="COLOR: gray"&gt;.&lt;/SPAN&gt;&lt;SPAN style="COLOR: fuchsia"&gt;object_id&lt;/SPAN&gt; &lt;SPAN style="COLOR: gray"&gt;=&lt;/SPAN&gt; i&lt;SPAN style="COLOR: gray"&gt;.&lt;/SPAN&gt;&lt;SPAN style="COLOR: fuchsia"&gt;object_id&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-fareast-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: gray"&gt;and&lt;/SPAN&gt; i&lt;SPAN style="COLOR: gray"&gt;.&lt;/SPAN&gt;index_id &lt;SPAN style="COLOR: gray"&gt;=&lt;/SPAN&gt; s&lt;SPAN style="COLOR: gray"&gt;.&lt;/SPAN&gt;index_id&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-fareast-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: gray"&gt;and&lt;/SPAN&gt; s&lt;SPAN style="COLOR: gray"&gt;.&lt;/SPAN&gt;database_id &lt;SPAN style="COLOR: gray"&gt;=&lt;/SPAN&gt; &lt;SPAN style="COLOR: fuchsia"&gt;db_id&lt;/SPAN&gt;&lt;SPAN style="COLOR: gray"&gt;()&lt;/SPAN&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="COLOR: blue; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-fareast-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;where&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-fareast-font-family: 'Times New Roman'; mso-no-proof: yes"&gt; &lt;SPAN style="COLOR: fuchsia"&gt;objectproperty&lt;/SPAN&gt;&lt;SPAN style="COLOR: gray"&gt;(&lt;/SPAN&gt;i&lt;SPAN style="COLOR: gray"&gt;.&lt;/SPAN&gt;&lt;SPAN style="COLOR: fuchsia"&gt;object_id&lt;/SPAN&gt;&lt;SPAN style="COLOR: gray"&gt;,&lt;/SPAN&gt; &lt;SPAN style="COLOR: red"&gt;'IsIndexable'&lt;/SPAN&gt;&lt;SPAN style="COLOR: gray"&gt;)&lt;/SPAN&gt; &lt;SPAN style="COLOR: gray"&gt;=&lt;/SPAN&gt; 1&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="COLOR: gray; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-fareast-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;AND&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-fareast-font-family: 'Times New Roman'; mso-no-proof: yes"&gt; &lt;SPAN style="COLOR: fuchsia"&gt;objectproperty&lt;/SPAN&gt;&lt;SPAN style="COLOR: gray"&gt;(&lt;/SPAN&gt;i&lt;SPAN style="COLOR: gray"&gt;.&lt;/SPAN&gt;&lt;SPAN style="COLOR: fuchsia"&gt;object_id&lt;/SPAN&gt;&lt;SPAN style="COLOR: gray"&gt;,&lt;/SPAN&gt; &lt;SPAN style="COLOR: red"&gt;'IsIndexed'&lt;/SPAN&gt;&lt;SPAN style="COLOR: gray"&gt;)&lt;/SPAN&gt; &lt;SPAN style="COLOR: gray"&gt;=&lt;/SPAN&gt; 1 &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="COLOR: gray; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-fareast-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;and&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-fareast-font-family: 'Times New Roman'; mso-no-proof: yes"&gt; s&lt;SPAN style="COLOR: gray"&gt;.&lt;/SPAN&gt;index_id &lt;SPAN style="COLOR: gray"&gt;is&lt;/SPAN&gt; &lt;SPAN style="COLOR: gray"&gt;null&lt;/SPAN&gt; &lt;SPAN style="COLOR: green"&gt;-- and dm_db_index_usage_stats has no reference to this index&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="COLOR: gray; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-fareast-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;or&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-fareast-font-family: 'Times New Roman'; mso-no-proof: yes"&gt; &lt;SPAN style="COLOR: gray"&gt;(&lt;/SPAN&gt;s&lt;SPAN style="COLOR: gray"&gt;.&lt;/SPAN&gt;user_updates &lt;SPAN style="COLOR: gray"&gt;&amp;gt;&lt;/SPAN&gt; 0 &lt;SPAN style="COLOR: gray"&gt;and&lt;/SPAN&gt; s&lt;SPAN style="COLOR: gray"&gt;.&lt;/SPAN&gt;user_seeks &lt;SPAN style="COLOR: gray"&gt;=&lt;/SPAN&gt; 0 &lt;SPAN style="COLOR: gray"&gt;and&lt;/SPAN&gt; s&lt;SPAN style="COLOR: gray"&gt;.&lt;/SPAN&gt;user_scans &lt;SPAN style="COLOR: gray"&gt;=&lt;/SPAN&gt; 0 &lt;SPAN style="COLOR: gray"&gt;and&lt;/SPAN&gt; s&lt;SPAN style="COLOR: gray"&gt;.&lt;/SPAN&gt;user_lookups &lt;SPAN style="COLOR: gray"&gt;=&lt;/SPAN&gt; 0&lt;SPAN style="COLOR: gray"&gt;)&lt;/SPAN&gt; &lt;SPAN style="COLOR: green"&gt;-- index is being updated, but not used by seeks/scans/lookups&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 6pt 0in 3pt 11.35pt"&gt;&lt;SPAN style="COLOR: blue; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-fareast-font-family: 'Times New Roman'; mso-no-proof: yes"&gt;order&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-fareast-font-family: 'Times New Roman'; mso-no-proof: yes"&gt; &lt;SPAN style="COLOR: blue"&gt;by&lt;/SPAN&gt; &lt;SPAN style="COLOR: fuchsia"&gt;object_name&lt;/SPAN&gt;&lt;SPAN style="COLOR: gray"&gt;(&lt;/SPAN&gt;i&lt;SPAN style="COLOR: gray"&gt;.&lt;/SPAN&gt;&lt;SPAN style="COLOR: fuchsia"&gt;object_id&lt;/SPAN&gt;&lt;SPAN style="COLOR: gray"&gt;)&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;asc&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="mso-ansi-language: EN-US"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 6pt 0in 3pt 11.35pt"&gt;&lt;SPAN style="mso-ansi-language: EN-US"&gt;In the above query, &lt;B style="mso-bidi-font-weight: normal"&gt;user_seeks&lt;/B&gt;, &lt;B style="mso-bidi-font-weight: normal"&gt;user_scans&lt;/B&gt;, and &lt;B style="mso-bidi-font-weight: normal"&gt;user_lookups&lt;/B&gt; counters indicate the usage of the particular index.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;If the value of the counters is 0, it means that index has never been used for any Seek, or Scan or Lookup operations.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 6pt 0in 3pt 11.35pt"&gt;&lt;SPAN lang=EN-AU&gt;Every individual seek, scan, lookup, or update on the specified index by one query execution is counted as a use of that index and increments the corresponding counter in this view (DMV). &lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 6pt 0in 3pt 11.35pt"&gt;&lt;SPAN lang=EN-AU&gt;The &lt;B&gt;user_updates&lt;/B&gt; counter indicates the level of maintenance on the index caused by insert, update, or delete operations on the underlying table or view. &lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 6pt 0in 3pt 11.35pt"&gt;&lt;SPAN lang=EN-AU&gt;The counters are initialized to empty whenever the SQL Server (MSSQLSERVER) service is started. In addition, whenever a database is detached or is shut down (for example, because AUTO_CLOSE is set to ON), all rows associated with the database are removed. &lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 6pt 0in 3pt 11.35pt"&gt;&lt;SPAN lang=EN-AU&gt;When an index is used, a row is added to &lt;B&gt;sys.dm_db_index_usage_stats&lt;/B&gt; if a row does not already exist for the index. When the row is added, its counters are initially set to zero.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=2609045" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/vipulshah/archive/tags/Missing+Indexes+DMVs/default.aspx">Missing Indexes DMVs</category></item></channel></rss>