Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 DBCC SHOWCONTIG WITH TABLERESULTS, ALL_INDEXES

Author  Topic 

jpotucek
Constraint Violating Yak Guru

273 Posts

Posted - 2008-12-12 : 14:15:03
If I run DBCC SHOWCONTIG WITH TABLERESULTS, ALL_INDEXES against my SQL Server 2000 database and see High Extent Fragmentation and logical Fragmentation numbers, what is the recommended way to remedy this??

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-12-12 : 14:18:51
Check out DBCC DBREINDEX and DBCC INDEXDEFRAG in SQL Server Books Online.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

jpotucek
Constraint Violating Yak Guru

273 Posts

Posted - 2008-12-12 : 15:32:08
I did a DBREINDEX on all tables in my DB (individually) using this format:

use MYDB
DBCC DBREINDEX ('MYDB.Territories', '', 70)

After doing this, the logical fragmentation and extent fragmentation numbers are still VERY high.. like 98 and 99%????

Go to Top of Page

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-12-12 : 17:23:04
quote:
Originally posted by jpotucek

I did a DBREINDEX on all tables in my DB (individually) using this format:

use MYDB
DBCC DBREINDEX ('MYDB.Territories', '', 70)

After doing this, the logical fragmentation and extent fragmentation numbers are still VERY high.. like 98 and 99%????





Is your table heap(without clustered index) What do you get scan density with DBCC showcontig?
Go to Top of Page

gvphubli
Yak Posting Veteran

54 Posts

Posted - 2008-12-12 : 20:25:59
In case table does not have clustered index and you want to defrag it - in that case you may want to add a primary key (temporary) like IDENTITY column and do the defrag and then remove it. But this involves time in case if your table is large - just a thought


TechnologyYogi
http://gvphubli.blogspot.com/
Go to Top of Page
   

- Advertisement -