﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / Article Discussions / Article Discussions by Author / Discuss content posted by Jason S Wong  / Index defrag - rebuid/reorg / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Wed, 19 Jun 2013 11:54:26 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Index defrag - rebuid/reorg</title><link>http://www.sqlservercentral.com/Forums/Topic816399-1665-1.aspx</link><description>[quote][b]Madhu R (3/23/2010)[/b][hr]Hi, Thanks for your script. I run the script. But its didn't turned out any index need to be defrag or whatever.. !! First its told me the PROC is not available. And I changed as "CREATE" instead of "ALTER". Please assist me. [/quote]Did you change these values?@minFragPercent = 70,@maxFragPercent = 100,@minRowCount = 1000</description><pubDate>Thu, 30 Sep 2010 20:23:30 GMT</pubDate><dc:creator>jswong05</dc:creator></item><item><title>RE: Index defrag - rebuid/reorg</title><link>http://www.sqlservercentral.com/Forums/Topic816399-1665-1.aspx</link><description>Read only. It is right there. I don't usually answer this kind of question. Today is exception.Leave the line PRINT @sql, comment out exec @sql.</description><pubDate>Thu, 08 Jul 2010 10:28:01 GMT</pubDate><dc:creator>jswong05</dc:creator></item><item><title>RE: Index defrag - rebuid/reorg</title><link>http://www.sqlservercentral.com/Forums/Topic816399-1665-1.aspx</link><description>Is there a 'Read-only' version of this script that can tell us if ANY indexes really need a defrag or reorg?    I think it would be better to try a read-only version before jumping into modifying any existing indexes.</description><pubDate>Wed, 07 Jul 2010 07:39:05 GMT</pubDate><dc:creator>JohnSQLServerCentral</dc:creator></item><item><title>RE: Index defrag - rebuid/reorg</title><link>http://www.sqlservercentral.com/Forums/Topic816399-1665-1.aspx</link><description>Hi, Thanks for your script. I run the script. But its didn't turned out any index need to be defrag or whatever.. !! First its told me the PROC is not available. And I changed as "CREATE" instead of "ALTER". Please assist me. </description><pubDate>Tue, 23 Mar 2010 20:32:09 GMT</pubDate><dc:creator>Madhu R</dc:creator></item><item><title>RE: Index defrag - rebuid/reorg</title><link>http://www.sqlservercentral.com/Forums/Topic816399-1665-1.aspx</link><description>FROM http://www.mssqltips.com/tip.asp?tip=17911. Rebuilding the Clustered Index (CI) does not rebuild the Non-Clustered Indexes (NCI) unless the keyword ALL is specified, you will have do it separately. 2. If you rebuild your indexes online, you must ensure that you have enough available disk space to hold the index that is being created along with the pre-existing index (source and target indexes simultaneously). After the rebuild operation, the old index will be dropped though. Also, rebuilding indexes online takes a significant amount more time and resources than just rebuilding the index. This is usually a considerable tradeoff since the table will remain available during the rebuild operation. 3. The underlying table cannot be altered, truncated, or dropped while an online index operation is in process. 4. For partitioned indexes built on a partition scheme, you can use either of these methods (Reorganize and Rebuild) on a complete index or on a single partition of an index. 5. In general, fragmentation on small indexes is often not controllable, in other words rebuilding or reorganizing small indexes often does not reduce fragmentation. That is because the pages of small indexes are stored on mixed extents. Mixed extents are shared by up to eight different objects, so the fragmentation in a small index might not be reduced after reorganizing or rebuilding the index. 6. Index rebuilding can be either online or offline. 7. Index reorganizing is always executed online. 8. The create index operation can be minimally logged if the database recovery model is set to either bulk-logged or simple. 9. An index cannot be reorganized or rebuilt if the filegroup in which it resides is offline or set to read-only.</description><pubDate>Tue, 09 Feb 2010 10:46:03 GMT</pubDate><dc:creator>TechnoPeasant</dc:creator></item><item><title>RE: Index defrag - rebuid/reorg</title><link>http://www.sqlservercentral.com/Forums/Topic816399-1665-1.aspx</link><description>DMV's are not in SQL 2000 - this won't work in that release.Question - If you are rebuilding the Clustered Index, why do you then rebuild all the other indexes?</description><pubDate>Mon, 30 Nov 2009 17:05:25 GMT</pubDate><dc:creator>Simon Facer</dc:creator></item><item><title>RE: Index defrag - rebuid/reorg</title><link>http://www.sqlservercentral.com/Forums/Topic816399-1665-1.aspx</link><description>Will this work for a sql2000 database?</description><pubDate>Mon, 30 Nov 2009 05:57:36 GMT</pubDate><dc:creator>Jim Dunn-363909</dc:creator></item><item><title>Index defrag - rebuid/reorg</title><link>http://www.sqlservercentral.com/Forums/Topic816399-1665-1.aspx</link><description>Comments posted to this topic are about the item [B]&lt;A HREF="/scripts/Index+defrag+-+rebuid%2freorg/68671/"&gt;Index defrag - rebuid/reorg&lt;/A&gt;[/B]</description><pubDate>Tue, 10 Nov 2009 04:28:13 GMT</pubDate><dc:creator>Repriser-991084</dc:creator></item></channel></rss>