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 2008 Forums
 SQL Server Administration (2008)
 High Page total Value when running DBCC SHOWCONTIG

Author  Topic 

KingCarlos
Yak Posting Veteran

74 Posts

Posted - 2010-04-05 : 23:45:04
Page total Value when running DBCC SHOWCONTIG

I ran the following SQL Script on a DB Table

DBCC SHOWCONTIG (test)
WITH FAST, TABLERESULTS, ALL_INDEXES, NO_INFOMSGS

And the value for the scandensity for the column testid was low, 30

So I fixed it up using the following

DBCC DBREINDEX (test, testid,0)

When I run the following SQL script

DBCC SHOWCONTIG (test)
WITH FAST, TABLERESULTS, ALL_INDEXES, NO_INFOMSGS

Testid scandensity is 91 but the total in the pages has jumped up to 160 from 2 is this something to be concerned about and if so how to reduce that number?

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-04-06 : 15:29:57
Why are you running these commands? Starting in SQL Server 2005, those are deprecated. What version of SQL Server are you using?

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

Subscribe to my blog
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-04-06 : 15:31:15
You can't defragment a table that small, so you should ignore that data. Only look at fragmentation when pages is about greater than 1000.

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

Subscribe to my blog
Go to Top of Page

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2010-04-06 : 16:50:01
agree with Tara. I filter on WHERE pagecount > 999 among other things.
Go to Top of Page

KingCarlos
Yak Posting Veteran

74 Posts

Posted - 2010-04-06 : 18:38:53
Thanks for the info I was unsure if 160 was a high page count, so rule of thumb is anything over 1000.

I am using SQL 2008, should there be different SQL Scripts to use to check and repair the scandensity?
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-04-06 : 18:41:56
You're welcome.

160 pages is a very small table.

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

Subscribe to my blog
Go to Top of Page
   

- Advertisement -