<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.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>What happens to non-clustered indexes when the table structure is changed?</title><link>http://blogs.msdn.com/b/sqlserverstorageengine/archive/2007/06/07/what-happens-to-non-clustered-indexes-when-the-table-structure-is-changed.aspx</link><description>Here’s a topic that’s cropped up several times during Q&amp;amp;As at TechEd this year – what happens to non-clustered indexes when changes are made to the underlying table? Are they always rebuilt or not? 
 
 Before we get into that discussion, I’ll give</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: What happens to non-clustered indexes when the table structure is changed?</title><link>http://blogs.msdn.com/b/sqlserverstorageengine/archive/2007/06/07/what-happens-to-non-clustered-indexes-when-the-table-structure-is-changed.aspx#6956594</link><pubDate>Wed, 02 Jan 2008 19:38:12 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6956594</guid><dc:creator>Joe Ferry</dc:creator><description>&lt;p&gt;Moving a unique clustered index to a different filegroup, or anywhere else, doesn't affect the nonclustered indexes because the leaf level of the nonclsutered index references sthe clustering key of the clustered index, not a RID or logical RID. The engine works through the B-Tree of the clustered index using the clustering key. A search using a non-clustered index where there is a clsutered index, works through two B-Trees to get to the full data row: one search through the B-Tree for the nonclustered index, and one for the clustered index.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=6956594" width="1" height="1"&gt;</description></item><item><title>.NET Tips &amp; Tricks </title><link>http://blogs.msdn.com/b/sqlserverstorageengine/archive/2007/06/07/what-happens-to-non-clustered-indexes-when-the-table-structure-is-changed.aspx#3272997</link><pubDate>Wed, 13 Jun 2007 22:13:31 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3272997</guid><dc:creator>Michael's Coding Den</dc:creator><description>&lt;p&gt;Last update: June 13 , 2007 Document version 0.6 Preface If you have something to add, or want to take&lt;/p&gt;
&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=3272997" width="1" height="1"&gt;</description></item><item><title>.NET Tips &amp; Tricks </title><link>http://blogs.msdn.com/b/sqlserverstorageengine/archive/2007/06/07/what-happens-to-non-clustered-indexes-when-the-table-structure-is-changed.aspx#3272996</link><pubDate>Wed, 13 Jun 2007 22:13:30 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3272996</guid><dc:creator>Michael's Coding Den</dc:creator><description>&lt;p&gt;Last update: June 13 , 2007 Document version 0.6 Preface If you have something to add, or want to take&lt;/p&gt;
&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=3272996" width="1" height="1"&gt;</description></item><item><title>re: What happens to non-clustered indexes when the table structure is changed?</title><link>http://blogs.msdn.com/b/sqlserverstorageengine/archive/2007/06/07/what-happens-to-non-clustered-indexes-when-the-table-structure-is-changed.aspx#3272421</link><pubDate>Wed, 13 Jun 2007 21:16:23 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3272421</guid><dc:creator>Paul Randal - MSFT</dc:creator><description>&lt;p&gt;KS - yes - ANY time the physical or logical RID changes, non-clustered indexes have to be rebuilt. In your example, the physical RID of the heap rows will change when they're moved to the new filegroups.&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=3272421" width="1" height="1"&gt;</description></item><item><title>re: What happens to non-clustered indexes when the table structure is changed?</title><link>http://blogs.msdn.com/b/sqlserverstorageengine/archive/2007/06/07/what-happens-to-non-clustered-indexes-when-the-table-structure-is-changed.aspx#3266549</link><pubDate>Wed, 13 Jun 2007 14:10:42 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3266549</guid><dc:creator>KS.</dc:creator><description>&lt;p&gt;We have a heap table with non-clustered indexes on it ,If we partition it and move the half the data &amp;amp; related index from current filegroup to other filegroup which is on other drive will it affect the non-clustered index ie will they be rebuilt .&lt;/p&gt;
&lt;p&gt;	In 2000 does the non-clustered index (on Heap )needs a rebuilt when we move it to other file group on other disk .&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=3266549" width="1" height="1"&gt;</description></item><item><title>re: What happens to non-clustered indexes when the table structure is changed?</title><link>http://blogs.msdn.com/b/sqlserverstorageengine/archive/2007/06/07/what-happens-to-non-clustered-indexes-when-the-table-structure-is-changed.aspx#3237115</link><pubDate>Tue, 12 Jun 2007 01:31:28 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3237115</guid><dc:creator>Paul Randal - MSFT</dc:creator><description>&lt;p&gt;Hi Leigh,&lt;/p&gt;
&lt;p&gt;Moving a clustered index has no effect on non-clustered indexes as the RID that is included in the non-clustered index is purely logical - it has nothing to do with the physical location of the clustered index.&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=3237115" width="1" height="1"&gt;</description></item><item><title>re: What happens to non-clustered indexes when the table structure is changed?</title><link>http://blogs.msdn.com/b/sqlserverstorageengine/archive/2007/06/07/what-happens-to-non-clustered-indexes-when-the-table-structure-is-changed.aspx#3232411</link><pubDate>Mon, 11 Jun 2007 19:59:23 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3232411</guid><dc:creator>parikht</dc:creator><description>&lt;p&gt;This is a very helpful article. Your rule of thumb says it all. If we start thinking of rebuilding indexes in that manner, it's pretty straight forward then. Thank you, Pal, for this helpful information.&lt;/p&gt;
&lt;p&gt;Tejas&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=3232411" width="1" height="1"&gt;</description></item><item><title>re: What happens to non-clustered indexes when the table structure is changed?</title><link>http://blogs.msdn.com/b/sqlserverstorageengine/archive/2007/06/07/what-happens-to-non-clustered-indexes-when-the-table-structure-is-changed.aspx#3157795</link><pubDate>Fri, 08 Jun 2007 11:27:03 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3157795</guid><dc:creator>lverhave</dc:creator><description>&lt;p&gt;Hi Paul,&lt;/p&gt;
&lt;p&gt;You mentioned in &amp;quot;changing the clustered index schema - changing anything esle&amp;quot; in SQL Server 2005 that if you move the clustered index to a different filegroup one would not have to rebuild the non-clustered indexes. What if the filegroup is in another drive, wouldn't the base table also be moved thus changing the physical RID?&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;Leigh&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=3157795" width="1" height="1"&gt;</description></item><item><title>re: What happens to non-clustered indexes when the table structure is changed?</title><link>http://blogs.msdn.com/b/sqlserverstorageengine/archive/2007/06/07/what-happens-to-non-clustered-indexes-when-the-table-structure-is-changed.aspx#3157792</link><pubDate>Fri, 08 Jun 2007 11:27:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3157792</guid><dc:creator>Arun Philip</dc:creator><description>&lt;p&gt;Quite informative. Thank you, Paul&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=3157792" width="1" height="1"&gt;</description></item></channel></rss>