September 21, 2004 03:21 PM

Automatic Reindexing

This DBCC SHOWCONTIG utility takes the stress out of index defragmentation
Rating: (0)
SQL Server Magazine
InstantDoc ID #43783
Performing routine database maintenance such as reindexing is important for keeping your databases running at peak performance. When you use INSERT, UPDATE, and DELETE statements to modify table data, indexes can become fragmented. Index fragmentation can happen when the logical sequence of pages is disrupted or when an index page contains less than its maximum amount of data, creating a gap in the data page or index. As indexes become fragmented, you get inefficient data reads when accessing tables and slower database performance.

But...

You must be a paid Professional Member to access this entire article.

Already a Professional Member? Please log in now:

NOT A PROFESSIONAL MEMBER? YOU CHOOSE:

Monthly or Annual

Professional Membership

VIP Membership

Compare Member Benefits

Add a Comment

Very useful article and seems to fill my needs.

Michael3/19/2008 3:56:53 PM


A piece of crap - it just doesn't work - it won't even make the objects much less actually do something.

john12/4/2007 8:47:27 AM


DBCC SHOWCONTIG WITH TABLERESULTS, ALL_INDEXES;

the above will give you better results without a cursor

Mike10/4/2007 10:25:19 AM


The syntax error is easy to fix - just modify the select statements (select from o to something like select * --from o). I compiled everything,and the demo works great
Anastasia

ANASTASIA4/13/2005 2:54:10 PM


Ditto. Errors in p_del_OBJECT_LIST_DATA limit the usefullness of the utility. I want to use it but make chages to use instead DBCC INDEXDEFRAG. Not knowing what the author was trying to do, means more time on my part. I would expect the listings in this Mag to work out of the box.

RALPH12/2/2004 8:56:25 AM


not only are there syntax errors in listing 1, but there are also errors in p_REINDEX_check in that it doesnt encapsulate the table names in braces to prevent it from erroring when a table has a space or period in its name.

JASON11/23/2004 6:02:41 PM


Very useful tool. But I am getting syntex errors when I implemented on production.

DBCC REINDEX syntex error. If you know the fix please let me know. I'm lazy to fix on my own.



RAJU10/28/2004 10:29:45 PM


Very useful idea, the syntax errors in the p_del_object_list_data procedure invalidate its' usefulness.


mselway10/22/2004 4:18:12 AM


I was thinking of doing a similiar approach. One thing I do different is when a cluster index needs to be Reindex I do all the indexes on the table by not specifying the index name. I found the command runs quicker than if I just did the cluster index. The Profiler reports the read and write counts are higher but the duration is less.

DAVID10/13/2004 8:14:13 AM


Oh yeah...Listing 1 does NOT show any delete statements, yet article says it is suppose to delete obsolete records.

Leo10/6/2004 2:45:42 PM


You must log on before posting a comment.

Are you a new visitor? Register Here

Related Resources

Special Report: Perspectives on SQL Server Sprawl
A Essential Guide by PolyServe
SQL Server 2008 Memory and CPU Highlights
A Tip Guide by Intel, Microsoft, Unisys
More

Field data type change - query timeout

Hi,       I need to change a data type of a field in SQL Server 2005. The fiels most be changed from varchar(13) to varchar (20), but because of th...222-96220

GOOGLE LINKS
SPONSORED LINKS
FEATURED LINKS