<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: SQL SERVER &#8211; ReIndexing Database Tables and Update Statistics on Tables</title>
	<atom:link href="http://blog.sqlauthority.com/2007/01/31/sql-server-reindexing-database-tables-and-update-statistics-on-tables/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sqlauthority.com/2007/01/31/sql-server-reindexing-database-tables-and-update-statistics-on-tables/</link>
	<description>Personal Notes of Pinal Dave</description>
	<lastBuildDate>Fri, 10 Feb 2012 04:45:32 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Pradip</title>
		<link>http://blog.sqlauthority.com/2007/01/31/sql-server-reindexing-database-tables-and-update-statistics-on-tables/#comment-181225</link>
		<dc:creator><![CDATA[Pradip]]></dc:creator>
		<pubDate>Thu, 20 Oct 2011 14:19:31 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/01/31/reindexing-database-tables-and-update-statistics-on-tables/#comment-181225</guid>
		<description><![CDATA[One of the Stored Procedures was taking around 17 Minutes to run and now after following the Re-Indexing Method it takes 3 Secs only!!!

Thanks for the article.]]></description>
		<content:encoded><![CDATA[<p>One of the Stored Procedures was taking around 17 Minutes to run and now after following the Re-Indexing Method it takes 3 Secs only!!!</p>
<p>Thanks for the article.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vrijdag</title>
		<link>http://blog.sqlauthority.com/2007/01/31/sql-server-reindexing-database-tables-and-update-statistics-on-tables/#comment-178299</link>
		<dc:creator><![CDATA[Vrijdag]]></dc:creator>
		<pubDate>Thu, 13 Oct 2011 08:13:18 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/01/31/reindexing-database-tables-and-update-statistics-on-tables/#comment-178299</guid>
		<description><![CDATA[Really good method for reducing dimension of a database which had a lot of insert/delete/update. It&#039;s working in my SQL Server 2008 R2.]]></description>
		<content:encoded><![CDATA[<p>Really good method for reducing dimension of a database which had a lot of insert/delete/update. It&#8217;s working in my SQL Server 2008 R2.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pokemon</title>
		<link>http://blog.sqlauthority.com/2007/01/31/sql-server-reindexing-database-tables-and-update-statistics-on-tables/#comment-168091</link>
		<dc:creator><![CDATA[Pokemon]]></dc:creator>
		<pubDate>Wed, 14 Sep 2011 19:41:06 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/01/31/reindexing-database-tables-and-update-statistics-on-tables/#comment-168091</guid>
		<description><![CDATA[Hello. Are there any updated version of this for MSSQL 2008 R2 ? thank you.]]></description>
		<content:encoded><![CDATA[<p>Hello. Are there any updated version of this for MSSQL 2008 R2 ? thank you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: newdba</title>
		<link>http://blog.sqlauthority.com/2007/01/31/sql-server-reindexing-database-tables-and-update-statistics-on-tables/#comment-166668</link>
		<dc:creator><![CDATA[newdba]]></dc:creator>
		<pubDate>Thu, 08 Sep 2011 23:46:32 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/01/31/reindexing-database-tables-and-update-statistics-on-tables/#comment-166668</guid>
		<description><![CDATA[I am planning to perform a rebuild of indexes every Sunday. 
However should I be running, 
1) sp_updatestats Mon - Sat 
OR
2) reorg index job Mon - Sat
Or
something else you recommen ?]]></description>
		<content:encoded><![CDATA[<p>I am planning to perform a rebuild of indexes every Sunday.<br />
However should I be running,<br />
1) sp_updatestats Mon &#8211; Sat<br />
OR<br />
2) reorg index job Mon &#8211; Sat<br />
Or<br />
something else you recommen ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: djh0131</title>
		<link>http://blog.sqlauthority.com/2007/01/31/sql-server-reindexing-database-tables-and-update-statistics-on-tables/#comment-161972</link>
		<dc:creator><![CDATA[djh0131]]></dc:creator>
		<pubDate>Thu, 25 Aug 2011 21:38:58 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/01/31/reindexing-database-tables-and-update-statistics-on-tables/#comment-161972</guid>
		<description><![CDATA[Should this be copied and pasted to the query without editing? I got this message after execution, with no apparent changes made. Should &#039;MyDatabase&#039; be edited to my database name?

Msg 911, Level 16, State 1, Line 1
Could not locate entry in sysdatabases for database &#039;MyDatabase&#039;. No entry found with that name. Make sure that the name is entered correctly.
[dbo].[Event_Classes]]]></description>
		<content:encoded><![CDATA[<p>Should this be copied and pasted to the query without editing? I got this message after execution, with no apparent changes made. Should &#8216;MyDatabase&#8217; be edited to my database name?</p>
<p>Msg 911, Level 16, State 1, Line 1<br />
Could not locate entry in sysdatabases for database &#8216;MyDatabase&#8217;. No entry found with that name. Make sure that the name is entered correctly.<br />
[dbo].[Event_Classes]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Orange Frog</title>
		<link>http://blog.sqlauthority.com/2007/01/31/sql-server-reindexing-database-tables-and-update-statistics-on-tables/#comment-143102</link>
		<dc:creator><![CDATA[Orange Frog]]></dc:creator>
		<pubDate>Thu, 23 Jun 2011 03:51:52 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/01/31/reindexing-database-tables-and-update-statistics-on-tables/#comment-143102</guid>
		<description><![CDATA[Does anyone know how long does this task take to run and does it use much CPU / Memory?]]></description>
		<content:encoded><![CDATA[<p>Does anyone know how long does this task take to run and does it use much CPU / Memory?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rusty</title>
		<link>http://blog.sqlauthority.com/2007/01/31/sql-server-reindexing-database-tables-and-update-statistics-on-tables/#comment-138502</link>
		<dc:creator><![CDATA[Rusty]]></dc:creator>
		<pubDate>Thu, 02 Jun 2011 22:53:48 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/01/31/reindexing-database-tables-and-update-statistics-on-tables/#comment-138502</guid>
		<description><![CDATA[Pinal Dave

You are the man, you really helped. I spend more than two days trying to find out what the problem was with my queries, little did i know that I needed to reindex my database tables and then update the statistics. 

You are one great DBA, I must say]]></description>
		<content:encoded><![CDATA[<p>Pinal Dave</p>
<p>You are the man, you really helped. I spend more than two days trying to find out what the problem was with my queries, little did i know that I needed to reindex my database tables and then update the statistics. </p>
<p>You are one great DBA, I must say</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Glen Joseph</title>
		<link>http://blog.sqlauthority.com/2007/01/31/sql-server-reindexing-database-tables-and-update-statistics-on-tables/#comment-121251</link>
		<dc:creator><![CDATA[Glen Joseph]]></dc:creator>
		<pubDate>Mon, 28 Feb 2011 22:26:04 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/01/31/reindexing-database-tables-and-update-statistics-on-tables/#comment-121251</guid>
		<description><![CDATA[1.	Run the following command. Focus on the “avg_fragmentation_in_percen”, Higher the number on this column, these are table you need to consider rebuilding / reorganize index

SELECT * FROM sys.dm_db_index_physical_stats (NULL, NULL, NULL, NULL, NULL);
GO

2.	Once you identfied the index with a higer number on the “avg_fragmentation_in_percen” column 

3.	Do some reading on Rebuild Index VS Reorganise 

http://www.sqlmag.com/blogs/sql-server-questions-answered/sql-server-questions-answered/tabid/1977/entryid/12869/Default.aspx

I don’t want to give you all the answers, the only way is you finding the best way.... hope the above hints are helpful]]></description>
		<content:encoded><![CDATA[<p>1.	Run the following command. Focus on the “avg_fragmentation_in_percen”, Higher the number on this column, these are table you need to consider rebuilding / reorganize index</p>
<p>SELECT * FROM sys.dm_db_index_physical_stats (NULL, NULL, NULL, NULL, NULL);<br />
GO</p>
<p>2.	Once you identfied the index with a higer number on the “avg_fragmentation_in_percen” column </p>
<p>3.	Do some reading on Rebuild Index VS Reorganise </p>
<p><a href="http://www.sqlmag.com/blogs/sql-server-questions-answered/sql-server-questions-answered/tabid/1977/entryid/12869/Default.aspx" rel="nofollow">http://www.sqlmag.com/blogs/sql-server-questions-answered/sql-server-questions-answered/tabid/1977/entryid/12869/Default.aspx</a></p>
<p>I don’t want to give you all the answers, the only way is you finding the best way&#8230;. hope the above hints are helpful</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gokul</title>
		<link>http://blog.sqlauthority.com/2007/01/31/sql-server-reindexing-database-tables-and-update-statistics-on-tables/#comment-117913</link>
		<dc:creator><![CDATA[Gokul]]></dc:creator>
		<pubDate>Thu, 10 Feb 2011 17:48:55 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/01/31/reindexing-database-tables-and-update-statistics-on-tables/#comment-117913</guid>
		<description><![CDATA[HI,

I am running SQL 2008  database about 40 GB. i need to have the database online 24/7. If i do RE_INDEX slowing down the user (grows 2 GB more). but the user asking no downtime requires. But we need to run the index rebuild in this situation wat will do? kindly advice any one about this.]]></description>
		<content:encoded><![CDATA[<p>HI,</p>
<p>I am running SQL 2008  database about 40 GB. i need to have the database online 24/7. If i do RE_INDEX slowing down the user (grows 2 GB more). but the user asking no downtime requires. But we need to run the index rebuild in this situation wat will do? kindly advice any one about this.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sagar</title>
		<link>http://blog.sqlauthority.com/2007/01/31/sql-server-reindexing-database-tables-and-update-statistics-on-tables/#comment-107652</link>
		<dc:creator><![CDATA[Sagar]]></dc:creator>
		<pubDate>Fri, 24 Dec 2010 11:32:27 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/01/31/reindexing-database-tables-and-update-statistics-on-tables/#comment-107652</guid>
		<description><![CDATA[I have a very basic question to ask you all, can any one explain the concept of re-indexing, why and how it is related with the performance of database or exactly what makes the db perform faster after re-indexing??

Thanks Sagar]]></description>
		<content:encoded><![CDATA[<p>I have a very basic question to ask you all, can any one explain the concept of re-indexing, why and how it is related with the performance of database or exactly what makes the db perform faster after re-indexing??</p>
<p>Thanks Sagar</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: r.prasad</title>
		<link>http://blog.sqlauthority.com/2007/01/31/sql-server-reindexing-database-tables-and-update-statistics-on-tables/#comment-101877</link>
		<dc:creator><![CDATA[r.prasad]]></dc:creator>
		<pubDate>Wed, 24 Nov 2010 14:26:52 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/01/31/reindexing-database-tables-and-update-statistics-on-tables/#comment-101877</guid>
		<description><![CDATA[what is update statistics and how it will work]]></description>
		<content:encoded><![CDATA[<p>what is update statistics and how it will work</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: madhivanan</title>
		<link>http://blog.sqlauthority.com/2007/01/31/sql-server-reindexing-database-tables-and-update-statistics-on-tables/#comment-97142</link>
		<dc:creator><![CDATA[madhivanan]]></dc:creator>
		<pubDate>Mon, 01 Nov 2010 09:59:17 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/01/31/reindexing-database-tables-and-update-statistics-on-tables/#comment-97142</guid>
		<description><![CDATA[Try this code

Dim cmd As SqlCommand = New SqlCommand(&quot;Exec sp_msForEachTable @COMMAND1= &#039;DBCC DBREINDEX (&#039;&#039;?&#039;&#039;)&#039;&quot;, con)]]></description>
		<content:encoded><![CDATA[<p>Try this code</p>
<p>Dim cmd As SqlCommand = New SqlCommand(&#8220;Exec sp_msForEachTable @COMMAND1= &#8216;DBCC DBREINDEX (&#8221;?&#8221;)&#8217;&#8221;, con)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: PRASAD S J</title>
		<link>http://blog.sqlauthority.com/2007/01/31/sql-server-reindexing-database-tables-and-update-statistics-on-tables/#comment-97134</link>
		<dc:creator><![CDATA[PRASAD S J]]></dc:creator>
		<pubDate>Mon, 01 Nov 2010 09:41:29 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/01/31/reindexing-database-tables-and-update-statistics-on-tables/#comment-97134</guid>
		<description><![CDATA[Dear madhivanan
        That is not working

PRASAD S J]]></description>
		<content:encoded><![CDATA[<p>Dear madhivanan<br />
        That is not working</p>
<p>PRASAD S J</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: madhivanan</title>
		<link>http://blog.sqlauthority.com/2007/01/31/sql-server-reindexing-database-tables-and-update-statistics-on-tables/#comment-97125</link>
		<dc:creator><![CDATA[madhivanan]]></dc:creator>
		<pubDate>Mon, 01 Nov 2010 08:58:33 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/01/31/reindexing-database-tables-and-update-statistics-on-tables/#comment-97125</guid>
		<description><![CDATA[Exec sp_msForEachTable @COMMAND1= DBCC DBREINDEX (‘?’)”, 

should be

Exec sp_msForEachTable @COMMAND1= &#039;DBCC DBREINDEX (&#039;&#039;?&#039;&#039;)”,]]></description>
		<content:encoded><![CDATA[<p>Exec sp_msForEachTable @COMMAND1= DBCC DBREINDEX (‘?’)”, </p>
<p>should be</p>
<p>Exec sp_msForEachTable @COMMAND1= &#8216;DBCC DBREINDEX (&#8221;?&#8221;)”,</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: PRASAD S J</title>
		<link>http://blog.sqlauthority.com/2007/01/31/sql-server-reindexing-database-tables-and-update-statistics-on-tables/#comment-96472</link>
		<dc:creator><![CDATA[PRASAD S J]]></dc:creator>
		<pubDate>Fri, 29 Oct 2010 13:55:11 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/01/31/reindexing-database-tables-and-update-statistics-on-tables/#comment-96472</guid>
		<description><![CDATA[Dear madhivanan,
    Following are my source code and the error i get is &quot;Incorrect syntax near the keyword &#039;DBCC&#039;.  Please help me.

regards,


Public Overrides Sub GetUIData()
    MyBase.GetUIData
    If Me.RE_INDEX.SelectedValue = &quot;Yes&quot; Then
	Dim con As SqlConnection = New SqlConnection(&quot;Data Source=ACER\SQLEXPRESS;Integrated Security=SSPI;Initial Catalog=FAS&quot;)
        Dim cmd As SqlCommand = New SqlCommand(&quot;Exec sp_msForEachTable @COMMAND1= DBCC DBREINDEX (&#039;?&#039;)&quot;, con)
	    con.Open()
        cmd.ExecuteNonQuery()
        con.Close()
    Else
        Throw New Exception(&quot;Indexing not done!&quot;)
    End If
End Sub]]></description>
		<content:encoded><![CDATA[<p>Dear madhivanan,<br />
    Following are my source code and the error i get is &#8220;Incorrect syntax near the keyword &#8216;DBCC&#8217;.  Please help me.</p>
<p>regards,</p>
<p>Public Overrides Sub GetUIData()<br />
    MyBase.GetUIData<br />
    If Me.RE_INDEX.SelectedValue = &#8220;Yes&#8221; Then<br />
	Dim con As SqlConnection = New SqlConnection(&#8220;Data Source=ACER\SQLEXPRESS;Integrated Security=SSPI;Initial Catalog=FAS&#8221;)<br />
        Dim cmd As SqlCommand = New SqlCommand(&#8220;Exec sp_msForEachTable @COMMAND1= DBCC DBREINDEX (&#8216;?&#8217;)&#8221;, con)<br />
	    con.Open()<br />
        cmd.ExecuteNonQuery()<br />
        con.Close()<br />
    Else<br />
        Throw New Exception(&#8220;Indexing not done!&#8221;)<br />
    End If<br />
End Sub</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Glenn</title>
		<link>http://blog.sqlauthority.com/2007/01/31/sql-server-reindexing-database-tables-and-update-statistics-on-tables/#comment-96382</link>
		<dc:creator><![CDATA[Glenn]]></dc:creator>
		<pubDate>Fri, 29 Oct 2010 01:28:17 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/01/31/reindexing-database-tables-and-update-statistics-on-tables/#comment-96382</guid>
		<description><![CDATA[Sorry should also mention.. the original blog executes sp_updatestats at the end. You dont need to do this.. a reindex actually recreates stats based on 100% of the data while a sp_updatestats will replace the stats based on a small percentage of data. So it is better to not update stats if you have just reindexed.]]></description>
		<content:encoded><![CDATA[<p>Sorry should also mention.. the original blog executes sp_updatestats at the end. You dont need to do this.. a reindex actually recreates stats based on 100% of the data while a sp_updatestats will replace the stats based on a small percentage of data. So it is better to not update stats if you have just reindexed.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Glenn</title>
		<link>http://blog.sqlauthority.com/2007/01/31/sql-server-reindexing-database-tables-and-update-statistics-on-tables/#comment-96380</link>
		<dc:creator><![CDATA[Glenn]]></dc:creator>
		<pubDate>Fri, 29 Oct 2010 01:22:17 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/01/31/reindexing-database-tables-and-update-statistics-on-tables/#comment-96380</guid>
		<description><![CDATA[Here&#039;s a sql statement that will reindex all tables in all databases. It skips standby databases and tempdb, you can also add additional dbs to skip if you wish - just mod the NOT IN clause.

-------------------------------
DECLARE @dbname VARCHAR(50) -- database name  
DECLARE @cmd VARCHAR(500)

DECLARE db_cursor CURSOR FOR  
SELECT name as dbname 
FROM master.sys.databases 
WHERE name NOT IN (&#039;tempdb&#039;) and is_in_standby = 0

OPEN db_cursor   
FETCH NEXT FROM db_cursor INTO @dbname   

WHILE @@FETCH_STATUS = 0   
BEGIN   
	    set @cmd = &#039;use &#039; + @dbname + &#039;; exec sp_MSForEachTable &#039;&#039;DBCC DBREINDEX(&#039;&#039;&#039;&#039;?&#039;&#039;&#039;&#039;,&#039;&#039;&#039;&#039;&#039;&#039;&#039;&#039;,90)&#039;&#039;;&#039;
		print @cmd
		exec (@cmd)

       FETCH NEXT FROM db_cursor INTO @dbname   
END   

CLOSE db_cursor   
DEALLOCATE db_cursor

-------------------------------]]></description>
		<content:encoded><![CDATA[<p>Here&#8217;s a sql statement that will reindex all tables in all databases. It skips standby databases and tempdb, you can also add additional dbs to skip if you wish &#8211; just mod the NOT IN clause.</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
DECLARE @dbname VARCHAR(50) &#8212; database name<br />
DECLARE @cmd VARCHAR(500)</p>
<p>DECLARE db_cursor CURSOR FOR<br />
SELECT name as dbname<br />
FROM master.sys.databases<br />
WHERE name NOT IN (&#8216;tempdb&#8217;) and is_in_standby = 0</p>
<p>OPEN db_cursor<br />
FETCH NEXT FROM db_cursor INTO @dbname   </p>
<p>WHILE @@FETCH_STATUS = 0<br />
BEGIN<br />
	    set @cmd = &#8216;use &#8216; + @dbname + &#8216;; exec sp_MSForEachTable &#8221;DBCC DBREINDEX(&#8221;&#8221;?&#8221;&#8221;,&#8221;&#8221;&#8221;&#8221;,90)&#8221;;&#8217;<br />
		print @cmd<br />
		exec (@cmd)</p>
<p>       FETCH NEXT FROM db_cursor INTO @dbname<br />
END   </p>
<p>CLOSE db_cursor<br />
DEALLOCATE db_cursor</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: madhivanan</title>
		<link>http://blog.sqlauthority.com/2007/01/31/sql-server-reindexing-database-tables-and-update-statistics-on-tables/#comment-96246</link>
		<dc:creator><![CDATA[madhivanan]]></dc:creator>
		<pubDate>Thu, 28 Oct 2010 07:43:49 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/01/31/reindexing-database-tables-and-update-statistics-on-tables/#comment-96246</guid>
		<description><![CDATA[What is the error you are getting?]]></description>
		<content:encoded><![CDATA[<p>What is the error you are getting?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: PRASAD S J</title>
		<link>http://blog.sqlauthority.com/2007/01/31/sql-server-reindexing-database-tables-and-update-statistics-on-tables/#comment-96042</link>
		<dc:creator><![CDATA[PRASAD S J]]></dc:creator>
		<pubDate>Wed, 27 Oct 2010 04:20:11 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/01/31/reindexing-database-tables-and-update-statistics-on-tables/#comment-96042</guid>
		<description><![CDATA[In VB 2005 the following command shows error, please help

Dim cmd As SqlCommand = New SqlCommand(&quot;Exec sp_msForEachTable @COMMAND1=DBCC DBREINDEX (&#039;?&#039;)&quot;, con)]]></description>
		<content:encoded><![CDATA[<p>In VB 2005 the following command shows error, please help</p>
<p>Dim cmd As SqlCommand = New SqlCommand(&#8220;Exec sp_msForEachTable @COMMAND1=DBCC DBREINDEX (&#8216;?&#8217;)&#8221;, con)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Thomas</title>
		<link>http://blog.sqlauthority.com/2007/01/31/sql-server-reindexing-database-tables-and-update-statistics-on-tables/#comment-90209</link>
		<dc:creator><![CDATA[Thomas]]></dc:creator>
		<pubDate>Thu, 30 Sep 2010 06:56:23 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/01/31/reindexing-database-tables-and-update-statistics-on-tables/#comment-90209</guid>
		<description><![CDATA[hello thomas again,
i have found an article from Tom Mills wich uses the strategy described above:
http://blogs.msdn.com/b/tommills/archive/2008/12/31/creating-a-job-to-re-index-all-user-databases-in-an-instance-of-sql-server-2005-2008.aspx]]></description>
		<content:encoded><![CDATA[<p>hello thomas again,<br />
i have found an article from Tom Mills wich uses the strategy described above:<br />
<a href="http://blogs.msdn.com/b/tommills/archive/2008/12/31/creating-a-job-to-re-index-all-user-databases-in-an-instance-of-sql-server-2005-2008.aspx" rel="nofollow">http://blogs.msdn.com/b/tommills/archive/2008/12/31/creating-a-job-to-re-index-all-user-databases-in-an-instance-of-sql-server-2005-2008.aspx</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Thomas</title>
		<link>http://blog.sqlauthority.com/2007/01/31/sql-server-reindexing-database-tables-and-update-statistics-on-tables/#comment-90050</link>
		<dc:creator><![CDATA[Thomas]]></dc:creator>
		<pubDate>Wed, 29 Sep 2010 09:24:09 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/01/31/reindexing-database-tables-and-update-statistics-on-tables/#comment-90050</guid>
		<description><![CDATA[I have to manage DBases of &gt; 1TB too.
unfortionatly the reindex process takes 24 hours, but we can be offline only during out of business hours.
(some ppl work sat + sun too, and yes i know about online reindex possibilities)
I wonder if it makes sense, just to rebuild the &quot;bad ones&quot;,
while keeping the &quot;good ones&quot;.

the query 

SELECT * FROM sys.dm_db_index_physical_stats
    (DB_ID(N&#039;mydatabase&#039;), NULL, NULL, NULL , &#039;DETAILED&#039;);

should deliver the necessary information. (avg_fragmentation_in_percent)

but i think i can&#039;t detect &quot;Out of Order&quot;-Pages with that function ?

the disadvante is that the function has to scan the whole DB once, wich is also very time consuming :(
In my short test, rebuilding all indexes took less time then analysing all...
i have to make more tests to come to a final result....

what do you think of just rebuilding the index based on its fragmentation-value ?
are there other indicators i should consider as well ?
How to detect &quot;out of order&quot;-pages ?]]></description>
		<content:encoded><![CDATA[<p>I have to manage DBases of &gt; 1TB too.<br />
unfortionatly the reindex process takes 24 hours, but we can be offline only during out of business hours.<br />
(some ppl work sat + sun too, and yes i know about online reindex possibilities)<br />
I wonder if it makes sense, just to rebuild the &#8220;bad ones&#8221;,<br />
while keeping the &#8220;good ones&#8221;.</p>
<p>the query </p>
<p>SELECT * FROM sys.dm_db_index_physical_stats<br />
    (DB_ID(N&#8217;mydatabase&#8217;), NULL, NULL, NULL , &#8216;DETAILED&#8217;);</p>
<p>should deliver the necessary information. (avg_fragmentation_in_percent)</p>
<p>but i think i can&#8217;t detect &#8220;Out of Order&#8221;-Pages with that function ?</p>
<p>the disadvante is that the function has to scan the whole DB once, wich is also very time consuming :(<br />
In my short test, rebuilding all indexes took less time then analysing all&#8230;<br />
i have to make more tests to come to a final result&#8230;.</p>
<p>what do you think of just rebuilding the index based on its fragmentation-value ?<br />
are there other indicators i should consider as well ?<br />
How to detect &#8220;out of order&#8221;-pages ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: DBA</title>
		<link>http://blog.sqlauthority.com/2007/01/31/sql-server-reindexing-database-tables-and-update-statistics-on-tables/#comment-87917</link>
		<dc:creator><![CDATA[DBA]]></dc:creator>
		<pubDate>Wed, 15 Sep 2010 11:15:16 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/01/31/reindexing-database-tables-and-update-statistics-on-tables/#comment-87917</guid>
		<description><![CDATA[Hi, I ran the method 1 query. where DB size is 100GB. it is taking huge time more than 1.5 hours. 

Normally how much time is required to ReIndex the 100GB of single database? on which basis time varies while running the ReIndexing query...]]></description>
		<content:encoded><![CDATA[<p>Hi, I ran the method 1 query. where DB size is 100GB. it is taking huge time more than 1.5 hours. </p>
<p>Normally how much time is required to ReIndex the 100GB of single database? on which basis time varies while running the ReIndexing query&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anthony</title>
		<link>http://blog.sqlauthority.com/2007/01/31/sql-server-reindexing-database-tables-and-update-statistics-on-tables/#comment-87380</link>
		<dc:creator><![CDATA[Anthony]]></dc:creator>
		<pubDate>Fri, 10 Sep 2010 17:08:37 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/01/31/reindexing-database-tables-and-update-statistics-on-tables/#comment-87380</guid>
		<description><![CDATA[Method 2 fails when you use schemas, it&#039;s probably safer to do something like
SELECT table_schema + &#039;.&#039; + table_name]]></description>
		<content:encoded><![CDATA[<p>Method 2 fails when you use schemas, it&#8217;s probably safer to do something like<br />
SELECT table_schema + &#8216;.&#8217; + table_name</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: haris</title>
		<link>http://blog.sqlauthority.com/2007/01/31/sql-server-reindexing-database-tables-and-update-statistics-on-tables/#comment-73753</link>
		<dc:creator><![CDATA[haris]]></dc:creator>
		<pubDate>Sat, 29 May 2010 06:27:19 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/01/31/reindexing-database-tables-and-update-statistics-on-tables/#comment-73753</guid>
		<description><![CDATA[thanks]]></description>
		<content:encoded><![CDATA[<p>thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Phil@financetutor</title>
		<link>http://blog.sqlauthority.com/2007/01/31/sql-server-reindexing-database-tables-and-update-statistics-on-tables/#comment-69241</link>
		<dc:creator><![CDATA[Phil@financetutor]]></dc:creator>
		<pubDate>Wed, 05 May 2010 10:35:54 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/01/31/reindexing-database-tables-and-update-statistics-on-tables/#comment-69241</guid>
		<description><![CDATA[I had been trying to figure out why my queries were slow when I upgraded to SQL Server 2008. Thanks for helping me figure out the issue. It&#039;s working perfectly fine now and faster than ever!]]></description>
		<content:encoded><![CDATA[<p>I had been trying to figure out why my queries were slow when I upgraded to SQL Server 2008. Thanks for helping me figure out the issue. It&#8217;s working perfectly fine now and faster than ever!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

