﻿<?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 Gregory Ferdinandsen  / Index Defragmentation and update stats / 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 01:09:56 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Index Defragmentation and update stats</title><link>http://www.sqlservercentral.com/Forums/Topic1078125-2621-1.aspx</link><description>[quote][b]skraghava (8/24/2011)[/b][hr]I think it if page level locking is disabled then you have to rebuild and not reorganize.[/quote]Send me a private message and I will send you the latest version of this script, it has a few kinks worked out after further QA in different environments.</description><pubDate>Wed, 24 Aug 2011 08:34:52 GMT</pubDate><dc:creator>GregoryF</dc:creator></item><item><title>RE: Index Defragmentation and update stats</title><link>http://www.sqlservercentral.com/Forums/Topic1078125-2621-1.aspx</link><description>I think it if page level locking is disabled then you have to rebuild and not reorganize.</description><pubDate>Wed, 24 Aug 2011 07:46:27 GMT</pubDate><dc:creator>skraghava</dc:creator></item><item><title>RE: Index Defragmentation and update stats</title><link>http://www.sqlservercentral.com/Forums/Topic1078125-2621-1.aspx</link><description>if i excecute i got below error.Msg 2552, Level 16, State 1, Line 1The index "INDEXNAME" (partition 1) on table "TABLENAME" cannot be reorganized because page level locking is disabled.Does allow_page_locks should be considered?</description><pubDate>Wed, 24 Aug 2011 07:43:34 GMT</pubDate><dc:creator>skraghava</dc:creator></item><item><title>RE: Index Defragmentation and update stats</title><link>http://www.sqlservercentral.com/Forums/Topic1078125-2621-1.aspx</link><description>[quote][b]shaun.stuart (6/9/2011)[/b][hr]Some changes I would make:- get rid of the switch from full or bulk to simple mode or make this an option. This could break log shipping, backup chains, etc. if not careful.[/quote]Oops. just noticed this was an option already :-)</description><pubDate>Thu, 09 Jun 2011 14:18:55 GMT</pubDate><dc:creator>shaun.stuart</dc:creator></item><item><title>RE: Index Defragmentation and update stats</title><link>http://www.sqlservercentral.com/Forums/Topic1078125-2621-1.aspx</link><description>Some changes I would make:- get rid of the switch from full or bulk to simple mode or make this an option. This could break log shipping, backup chains, etc. if not careful.- If the index is rebuilt, skip the update stats portion. An index rebuild always updates stats with a 100% sampling rate. (See http://www.sqlskills.com/BLOGS/PAUL/post/Search-Engine-QA-10-Rebuilding-Indexes-and-Updating-Statistics.aspx)Otherwise, very nice.</description><pubDate>Thu, 09 Jun 2011 14:12:00 GMT</pubDate><dc:creator>shaun.stuart</dc:creator></item><item><title>RE: Index Defragmentation and update stats</title><link>http://www.sqlservercentral.com/Forums/Topic1078125-2621-1.aspx</link><description>I changed a few references to @DBName to quotename(@DBName) as there is an issue with database names with spaces.Otherwise, thanks very much.</description><pubDate>Thu, 19 May 2011 07:27:26 GMT</pubDate><dc:creator>Jon Cooney</dc:creator></item><item><title>RE: Index Defragmentation and update stats</title><link>http://www.sqlservercentral.com/Forums/Topic1078125-2621-1.aspx</link><description>There is included an option for a full rescan if update stats is a selected option</description><pubDate>Thu, 14 Apr 2011 11:33:10 GMT</pubDate><dc:creator>GregoryF</dc:creator></item><item><title>RE: Index Defragmentation and update stats</title><link>http://www.sqlservercentral.com/Forums/Topic1078125-2621-1.aspx</link><description>You may want to reconsider your use of sp_updatestats as the only way to update the statistics of the database. This normally will only sample a portion of each table and you may not be getting the best query plan as a result. I have seen where it will do a full scan, but sometimes I have seen it scan below 1% if the table is large enough.</description><pubDate>Wed, 06 Apr 2011 14:43:37 GMT</pubDate><dc:creator>originsone</dc:creator></item><item><title>RE: Index Defragmentation and update stats</title><link>http://www.sqlservercentral.com/Forums/Topic1078125-2621-1.aspx</link><description>An interesting note, I just found this error.  I will look at how to address it.Msg 2725, Level 16, State 2, Line 1An online operation cannot be performed for index 'PK_notable_query_plan' because the index contains column 'query_plan' of data type text, ntext, image, varchar(max), nvarchar(max), varbinary(max), xml, or large CLR type. For a non-clustered index, the column could be an include column of the index. For a clustered index, the column could be any column of the table. If DROP_EXISTING is used, the column could be part of a new or old index. The operation must be performed offline.</description><pubDate>Tue, 15 Mar 2011 05:54:20 GMT</pubDate><dc:creator>GregoryF</dc:creator></item><item><title>Index Defragmentation and update stats</title><link>http://www.sqlservercentral.com/Forums/Topic1078125-2621-1.aspx</link><description>Comments posted to this topic are about the item [B]&lt;A HREF="/scripts/Administration/72594/"&gt;Index Defragmentation and update stats&lt;/A&gt;[/B]</description><pubDate>Mon, 14 Mar 2011 23:00:14 GMT</pubDate><dc:creator>GregoryF</dc:creator></item></channel></rss>