Follow me on Twitter at Twitter.com/wbm
FYI, I'm blogging most of my stuff over at More Wally now.
You might want to add my rss feed to your reader at:http://morewally.com/cs/blogs/wallym/rss.aspx
Mom always warned me to keep my database indexes clean - Wallace B. McClure

Wallace B. McClure

All About Wally McClure - The musings of Wallym on Web, HTML5, Mobile, MonoTouch for iPhone, MonoDroid for Android, and Windows Azure.

News

Personal Blog

Work Blog

.NET

Book Authors

Business

Family

Friends

Georgia Tech Bloggers

Personal

Archives

Mom always warned me to keep my database indexes clean

As I have been working on my Web Search with .NET code, one of the interesting items that I have run into is the need to keep indexes clean and defragmented.  If an index becomes overly fragmented, performance can suffer greatly.  Well sports fans, Sql Server 2000 allows you to defragment indexes while the application is running.  The options on the command that I used is “dbcc indexdefrag (databasename, tablename, indexname);“  There are several options on the command that you can see here.  By defragmenting the indexes, performance jumped way back up (100 search urls / minute jumped up to about 3,000 urls / minute with Full-Text indexing turned off).  The beauty of indexdefrag is that you can defrag the indexes without taking the database offline.  So, mom was right.  Things work better when you keep your indexes cleaned up. 

Wally

Comments

Tara said:

And if you can, run DBCC DBREINDEX occassionally.

"DBCC INDEXDEFRAG will not help if two indexes are interleaved on the disk because INDEXDEFRAG shuffles the pages in place. To improve the clustering of pages, rebuild the index."

To see if you need to defragment, run DBCC SHOWCONTIG.
# April 1, 2004 7:19 PM

TrackBack said:

Take Outs for 1 April 2004
# April 1, 2004 11:16 PM

TrackBack said:

# April 30, 2004 2:05 PM

hfhgdfh said:

ghdfghdf
# May 8, 2004 7:50 AM

Weblog said:

As a small followup to my post about “Mom always warned me to keepmy databaseindexes clean,”...

# October 3, 2006 2:40 PM
Leave a Comment

(required) 

(required) 

(optional)

(required)