<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Index Clean-Up Scripts</title>
	<atom:link href="http://sqlfool.com/2009/01/index-clean-up-scripts/feed/" rel="self" type="application/rss+xml" />
	<link>http://sqlfool.com/2009/01/index-clean-up-scripts/</link>
	<description>Adventures in SQL Tuning - a blog for the rest of us</description>
	<lastBuildDate>Thu, 04 Feb 2010 08:21:02 -0700</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: First round of SQLServerPedia syndicated bloggers &#124; Brent Ozar - SQL Server DBA</title>
		<link>http://sqlfool.com/2009/01/index-clean-up-scripts/comment-page-1/#comment-4924</link>
		<dc:creator>First round of SQLServerPedia syndicated bloggers &#124; Brent Ozar - SQL Server DBA</dc:creator>
		<pubDate>Sat, 05 Sep 2009 17:52:33 +0000</pubDate>
		<guid isPermaLink="false">http://sqlfool.com/?p=335#comment-4924</guid>
		<description>[...] Index clean-up scripts &#8211; before you make new indexes to improve performance, are you sure you need the ones you&#8217;ve already got? [...]</description>
		<content:encoded><![CDATA[<p>[...] Index clean-up scripts &#8211; before you make new indexes to improve performance, are you sure you need the ones you&#8217;ve already got? [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rob</title>
		<link>http://sqlfool.com/2009/01/index-clean-up-scripts/comment-page-1/#comment-4901</link>
		<dc:creator>Rob</dc:creator>
		<pubDate>Wed, 26 Aug 2009 10:29:30 +0000</pubDate>
		<guid isPermaLink="false">http://sqlfool.com/?p=335#comment-4901</guid>
		<description>To solve the &quot;Cannot resolve collation conflict for column 2 in SELECT statement.&quot;, replace 
&quot;AS sql_statement&quot;
 with &quot;COLLATE database_default AS sql_statement&quot;</description>
		<content:encoded><![CDATA[<p>To solve the &#8220;Cannot resolve collation conflict for column 2 in SELECT statement.&#8221;, replace<br />
&#8220;AS sql_statement&#8221;<br />
 with &#8220;COLLATE database_default AS sql_statement&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: alerya</title>
		<link>http://sqlfool.com/2009/01/index-clean-up-scripts/comment-page-1/#comment-4539</link>
		<dc:creator>alerya</dc:creator>
		<pubDate>Thu, 18 Jun 2009 06:01:20 +0000</pubDate>
		<guid isPermaLink="false">http://sqlfool.com/?p=335#comment-4539</guid>
		<description>David. I am not shure, but try to use

N &#039; abracadabra &#039;

instead of

&#039; abracadabra &#039;</description>
		<content:encoded><![CDATA[<p>David. I am not shure, but try to use</p>
<p>N &#8216; abracadabra &#8216;</p>
<p>instead of</p>
<p>&#8216; abracadabra &#8216;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: david hay</title>
		<link>http://sqlfool.com/2009/01/index-clean-up-scripts/comment-page-1/#comment-4421</link>
		<dc:creator>david hay</dc:creator>
		<pubDate>Mon, 08 Jun 2009 15:10:46 +0000</pubDate>
		<guid isPermaLink="false">http://sqlfool.com/?p=335#comment-4421</guid>
		<description>Michelle,

Thanks for the scripts, they work great except in a case sensitive collation.  OBJECT_ID, and STATEMENT both need to be lower case.

The 2nd query I am still having an issue with

Msg 451, Level 16, State 1, Line 1
Cannot resolve collation conflict for column 2 in SELECT statement.

Any thoughts or suggestions?

Thanks again!

David Hay</description>
		<content:encoded><![CDATA[<p>Michelle,</p>
<p>Thanks for the scripts, they work great except in a case sensitive collation.  OBJECT_ID, and STATEMENT both need to be lower case.</p>
<p>The 2nd query I am still having an issue with</p>
<p>Msg 451, Level 16, State 1, Line 1<br />
Cannot resolve collation conflict for column 2 in SELECT statement.</p>
<p>Any thoughts or suggestions?</p>
<p>Thanks again!</p>
<p>David Hay</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michelle Ufford</title>
		<link>http://sqlfool.com/2009/01/index-clean-up-scripts/comment-page-1/#comment-2494</link>
		<dc:creator>Michelle Ufford</dc:creator>
		<pubDate>Thu, 16 Apr 2009 13:54:10 +0000</pubDate>
		<guid isPermaLink="false">http://sqlfool.com/?p=335#comment-2494</guid>
		<description>Hi Alerya,

I just took a look and the problem is that I was using [is_unique] instead of [is_unique_constraint].  I&#039;ve updated the script to use the appropriate columns.

Thank you, Alerya, for catching that bug!  :)</description>
		<content:encoded><![CDATA[<p>Hi Alerya,</p>
<p>I just took a look and the problem is that I was using [is_unique] instead of [is_unique_constraint].  I&#8217;ve updated the script to use the appropriate columns.</p>
<p>Thank you, Alerya, for catching that bug!  <img src='http://sqlfool.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: alerya</title>
		<link>http://sqlfool.com/2009/01/index-clean-up-scripts/comment-page-1/#comment-2436</link>
		<dc:creator>alerya</dc:creator>
		<pubDate>Wed, 15 Apr 2009 06:03:12 +0000</pubDate>
		<guid isPermaLink="false">http://sqlfool.com/?p=335#comment-2436</guid>
		<description>I found a small error in the code. The matter that if inde type is 2 and can be unique, so  better I think will be instead of :
.....
            WHEN i.type = 2 And i.is_unique = 1
                THEN &#039;Alter Table &#039; + @dbName 
.....
better way is:
WHEN i.type = 2
                THEN &#039;Drop Index &#039; + i.name 
                    + &#039; On &#039; + @dbName 
                    + &#039;.dbo.&#039; + OBJECT_NAME(ddius.[OBJECT_ID]) + &#039;;&#039;
            WHEN i.type = 1 And i.is_unique = 1
                THEN &#039;Alter Table &#039; + @dbName 
                    + &#039;.dbo.&#039; + OBJECT_NAME(ddius.[OBJECT_ID]) 
                    + &#039; Drop Constraint &#039; + i.name + &#039;;&#039;
            ELSE &#039;&#039; 
          END AS &#039;SQL_DropStatement&#039;</description>
		<content:encoded><![CDATA[<p>I found a small error in the code. The matter that if inde type is 2 and can be unique, so  better I think will be instead of :<br />
&#8230;..<br />
            WHEN i.type = 2 And i.is_unique = 1<br />
                THEN &#8216;Alter Table &#8216; + @dbName<br />
&#8230;..<br />
better way is:<br />
WHEN i.type = 2<br />
                THEN &#8216;Drop Index &#8216; + i.name<br />
                    + &#8216; On &#8216; + @dbName<br />
                    + &#8216;.dbo.&#8217; + OBJECT_NAME(ddius.[OBJECT_ID]) + &#8216;;&#8217;<br />
            WHEN i.type = 1 And i.is_unique = 1<br />
                THEN &#8216;Alter Table &#8216; + @dbName<br />
                    + &#8216;.dbo.&#8217; + OBJECT_NAME(ddius.[OBJECT_ID])<br />
                    + &#8216; Drop Constraint &#8216; + i.name + &#8216;;&#8217;<br />
            ELSE &#8221;<br />
          END AS &#8216;SQL_DropStatement&#8217;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Weekly Link Roundup 2009-02-04 &#124; codegumbo</title>
		<link>http://sqlfool.com/2009/01/index-clean-up-scripts/comment-page-1/#comment-220</link>
		<dc:creator>Weekly Link Roundup 2009-02-04 &#124; codegumbo</dc:creator>
		<pubDate>Thu, 05 Feb 2009 02:26:54 +0000</pubDate>
		<guid isPermaLink="false">http://sqlfool.com/?p=335#comment-220</guid>
		<description>[...] Index Clean-Up Scripts:  It seems like I&#8217;ve beeen reading a lot about performance tuning and maintenance issues; you&#8217;re right.  I&#8217;m sudying for the upgrade to my MCDBA (MCITP), and a lot of my maintenance skills are rusty.  Posts like these are very interesting and help to keep the skills in check. [...]</description>
		<content:encoded><![CDATA[<p>[...] Index Clean-Up Scripts:  It seems like I&#8217;ve beeen reading a lot about performance tuning and maintenance issues; you&#8217;re right.  I&#8217;m sudying for the upgrade to my MCDBA (MCITP), and a lot of my maintenance skills are rusty.  Posts like these are very interesting and help to keep the skills in check. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Micchael B</title>
		<link>http://sqlfool.com/2009/01/index-clean-up-scripts/comment-page-1/#comment-197</link>
		<dc:creator>Micchael B</dc:creator>
		<pubDate>Fri, 30 Jan 2009 14:58:02 +0000</pubDate>
		<guid isPermaLink="false">http://sqlfool.com/?p=335#comment-197</guid>
		<description>Sean, one supposed way to work around that is to disable the index - which means it no longer gets updated, which would improve write performance.  The downside is that I&#039;ve not had the DISABLE work properly, though I would play with the ability.  

For you it&#039;s less of a deal - they&#039;re just saying it&#039;s unsupported, not that they&#039;ll stop supporting it (there are some apps where changing ANYTHING with the indexes negates their support).

Michelle, thanks for the script.  Interesting to see how people do it slightly differently; mine doesn&#039;t worry about the partitioned indexes (I should add it), but doesn&#039;t look at clustered indexes.</description>
		<content:encoded><![CDATA[<p>Sean, one supposed way to work around that is to disable the index &#8211; which means it no longer gets updated, which would improve write performance.  The downside is that I&#8217;ve not had the DISABLE work properly, though I would play with the ability.  </p>
<p>For you it&#8217;s less of a deal &#8211; they&#8217;re just saying it&#8217;s unsupported, not that they&#8217;ll stop supporting it (there are some apps where changing ANYTHING with the indexes negates their support).</p>
<p>Michelle, thanks for the script.  Interesting to see how people do it slightly differently; mine doesn&#8217;t worry about the partitioned indexes (I should add it), but doesn&#8217;t look at clustered indexes.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SQL Queries That Identify Unused Indexes - Finders Keepers! &#171; Sean Decker - SQL Server DBA</title>
		<link>http://sqlfool.com/2009/01/index-clean-up-scripts/comment-page-1/#comment-196</link>
		<dc:creator>SQL Queries That Identify Unused Indexes - Finders Keepers! &#171; Sean Decker - SQL Server DBA</dc:creator>
		<pubDate>Fri, 30 Jan 2009 14:10:48 +0000</pubDate>
		<guid isPermaLink="false">http://sqlfool.com/?p=335#comment-196</guid>
		<description>[...] The query below was posted by Michell Ufford - a.k.a SQLFool [...]</description>
		<content:encoded><![CDATA[<p>[...] The query below was posted by Michell Ufford - a.k.a SQLFool [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sean Decker</title>
		<link>http://sqlfool.com/2009/01/index-clean-up-scripts/comment-page-1/#comment-178</link>
		<dc:creator>Sean Decker</dc:creator>
		<pubDate>Sat, 24 Jan 2009 15:24:44 +0000</pubDate>
		<guid isPermaLink="false">http://sqlfool.com/?p=335#comment-178</guid>
		<description>Michelle,

That is the case:  3rd Party app(s).  Indexed for various customer scenarios.  One table in particular has tens of millions of rows and writes.  Eight of the indexes on it have a grand total of 14 reads (five have zero).

Reports of slowness came in.  Performance isn&#039;t quite as critical...it&#039;s an &quot;IS&quot; box...but the education has been.

Supports reply, paraphrased:  &quot;Changing the indexes is not a supported modification, as it can affect the performance of the software, this has not been tested. With that said, ultimately it will not HURT anything since it is just an index, but it may change how fast the app performs. Indexes are used in writing as well as reading.&quot;

Thanks,
Sean.</description>
		<content:encoded><![CDATA[<p>Michelle,</p>
<p>That is the case:  3rd Party app(s).  Indexed for various customer scenarios.  One table in particular has tens of millions of rows and writes.  Eight of the indexes on it have a grand total of 14 reads (five have zero).</p>
<p>Reports of slowness came in.  Performance isn&#8217;t quite as critical&#8230;it&#8217;s an &#8220;IS&#8221; box&#8230;but the education has been.</p>
<p>Supports reply, paraphrased:  &#8220;Changing the indexes is not a supported modification, as it can affect the performance of the software, this has not been tested. With that said, ultimately it will not HURT anything since it is just an index, but it may change how fast the app performs. Indexes are used in writing as well as reading.&#8221;</p>
<p>Thanks,<br />
Sean.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
